lustre-client support
Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
This commit is contained in:
parent
185d487d63
commit
498277408a
|
|
@ -0,0 +1,10 @@
|
||||||
|
driver: lustre-client
|
||||||
|
instance_id:
|
||||||
|
lustre:
|
||||||
|
shareHost: server address
|
||||||
|
shareBasePath: "/some/path"
|
||||||
|
# shareHost:shareBasePath should be mounted at this location in the controller container
|
||||||
|
controllerBasePath: "/storage"
|
||||||
|
dirPermissionsMode: "0777"
|
||||||
|
dirPermissionsUser: root
|
||||||
|
dirPermissionsGroup: wheel
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
const { ControllerClientCommonDriver } = require("../controller-client-common");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Crude lustre-client driver which simply creates directories to be mounted
|
||||||
|
* and uses rsync for cloning/snapshots
|
||||||
|
*/
|
||||||
|
class ControllerLustreClientDriver extends ControllerClientCommonDriver {
|
||||||
|
constructor(ctx, options) {
|
||||||
|
super(...arguments);
|
||||||
|
}
|
||||||
|
|
||||||
|
getConfigKey() {
|
||||||
|
return "lustre";
|
||||||
|
}
|
||||||
|
|
||||||
|
getVolumeContext(name) {
|
||||||
|
const driver = this;
|
||||||
|
const config_key = driver.getConfigKey();
|
||||||
|
return {
|
||||||
|
node_attach_driver: "lustre",
|
||||||
|
server: this.options[config_key].shareHost,
|
||||||
|
share: driver.getShareVolumePath(name),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
getFsTypes() {
|
||||||
|
return ["lustre"];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports.ControllerLustreClientDriver = ControllerLustreClientDriver;
|
||||||
|
|
@ -7,6 +7,7 @@ const {
|
||||||
|
|
||||||
const { ControllerNfsClientDriver } = require("./controller-nfs-client");
|
const { ControllerNfsClientDriver } = require("./controller-nfs-client");
|
||||||
const { ControllerSmbClientDriver } = require("./controller-smb-client");
|
const { ControllerSmbClientDriver } = require("./controller-smb-client");
|
||||||
|
const { ControllerLustreClientDriver } = require("./controller-lustre-client");
|
||||||
const { ControllerSynologyDriver } = require("./controller-synology");
|
const { ControllerSynologyDriver } = require("./controller-synology");
|
||||||
const { NodeManualDriver } = require("./node-manual");
|
const { NodeManualDriver } = require("./node-manual");
|
||||||
|
|
||||||
|
|
@ -36,6 +37,8 @@ function factory(ctx, options) {
|
||||||
return new ControllerSmbClientDriver(ctx, options);
|
return new ControllerSmbClientDriver(ctx, options);
|
||||||
case "nfs-client":
|
case "nfs-client":
|
||||||
return new ControllerNfsClientDriver(ctx, options);
|
return new ControllerNfsClientDriver(ctx, options);
|
||||||
|
case "lustre-client":
|
||||||
|
return new ControllerLustreClientDriver(ctx, options);
|
||||||
case "node-manual":
|
case "node-manual":
|
||||||
return new NodeManualDriver(ctx, options);
|
return new NodeManualDriver(ctx, options);
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
|
|
@ -316,6 +316,7 @@ class CsiBaseDriver {
|
||||||
|
|
||||||
switch (node_attach_driver) {
|
switch (node_attach_driver) {
|
||||||
case "nfs":
|
case "nfs":
|
||||||
|
case "lustre":
|
||||||
device = `${volume_context.server}:${volume_context.share}`;
|
device = `${volume_context.server}:${volume_context.share}`;
|
||||||
break;
|
break;
|
||||||
case "smb":
|
case "smb":
|
||||||
|
|
@ -814,6 +815,7 @@ class CsiBaseDriver {
|
||||||
switch (node_attach_driver) {
|
switch (node_attach_driver) {
|
||||||
case "nfs":
|
case "nfs":
|
||||||
case "smb":
|
case "smb":
|
||||||
|
case "lustre":
|
||||||
case "iscsi":
|
case "iscsi":
|
||||||
// ensure appropriate directories/files
|
// ensure appropriate directories/files
|
||||||
switch (access_type) {
|
switch (access_type) {
|
||||||
|
|
|
||||||
|
|
@ -87,6 +87,9 @@ class NodeManualDriver extends CsiBaseDriver {
|
||||||
case "smb":
|
case "smb":
|
||||||
driverResourceType = "filesystem";
|
driverResourceType = "filesystem";
|
||||||
fs_types = ["cifs"];
|
fs_types = ["cifs"];
|
||||||
|
case "lustre":
|
||||||
|
driverResourceType = "filesystem";
|
||||||
|
fs_types = ["lustre"];
|
||||||
break;
|
break;
|
||||||
case "iscsi":
|
case "iscsi":
|
||||||
driverResourceType = "volume";
|
driverResourceType = "volume";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue