diff --git a/src/driver/controller-zfs-generic/index.js b/src/driver/controller-zfs-generic/index.js index 09d0c7b..de9f68c 100644 --- a/src/driver/controller-zfs-generic/index.js +++ b/src/driver/controller-zfs-generic/index.js @@ -47,8 +47,9 @@ class ControllerZfsGenericDriver extends ControllerZfsSshBaseDriver { ] ) { await zb.zfs.set(datasetName, { - [key]: this.options.nfs.shareStrategySetDatasetProperties - .properties[key], + [key]: + this.options.nfs.shareStrategySetDatasetProperties + .properties[key], }); } } @@ -114,8 +115,10 @@ class ControllerZfsGenericDriver extends ControllerZfsSshBaseDriver { if (this.options.iscsi.shareStrategyTargetCli.tpg.attributes) { for (const attributeName in this.options.iscsi .shareStrategyTargetCli.tpg.attributes) { - const attributeValue = this.options.iscsi - .shareStrategyTargetCli.tpg.attributes[attributeName]; + const attributeValue = + this.options.iscsi.shareStrategyTargetCli.tpg.attributes[ + attributeName + ]; setAttributesText += "\n"; setAttributesText += `set attribute ${attributeName}=${attributeValue}`; } @@ -124,8 +127,10 @@ class ControllerZfsGenericDriver extends ControllerZfsSshBaseDriver { if (this.options.iscsi.shareStrategyTargetCli.tpg.auth) { for (const attributeName in this.options.iscsi .shareStrategyTargetCli.tpg.auth) { - const attributeValue = this.options.iscsi - .shareStrategyTargetCli.tpg.auth[attributeName]; + const attributeValue = + this.options.iscsi.shareStrategyTargetCli.tpg.auth[ + attributeName + ]; setAttributesText += "\n"; setAttributesText += `set auth ${attributeName}=${attributeValue}`; } @@ -168,11 +173,11 @@ create /backstores/block/${iscsiName} volume_context = { node_attach_driver: "iscsi", - portal: this.options.iscsi.targetPortal, + portal: this.options.iscsi.targetPortal || "", portals: this.options.iscsi.targetPortals ? this.options.iscsi.targetPortals.join(",") : "", - interface: this.options.iscsi.interface, + interface: this.options.iscsi.interface || "", iqn: iqn, lun: 0, }; diff --git a/src/driver/freenas/ssh.js b/src/driver/freenas/ssh.js index e9987bc..b7b07f4 100644 --- a/src/driver/freenas/ssh.js +++ b/src/driver/freenas/ssh.js @@ -1234,7 +1234,7 @@ class FreeNASDriver extends ControllerZfsSshBaseDriver { volume_context = { node_attach_driver: "iscsi", - portal: this.options.iscsi.targetPortal, + portal: this.options.iscsi.targetPortal || "", portals: this.options.iscsi.targetPortals ? this.options.iscsi.targetPortals.join(",") : "",