Merge branch 'next' of github.com:democratic-csi/democratic-csi into next
This commit is contained in:
commit
a36b73bf23
|
|
@ -71,6 +71,10 @@ iscsi:
|
||||||
# mutual CHAP
|
# mutual CHAP
|
||||||
#mutual_userid: "baz"
|
#mutual_userid: "baz"
|
||||||
#mutual_password: "bar"
|
#mutual_password: "bar"
|
||||||
|
block:
|
||||||
|
attributes:
|
||||||
|
# set to 1 to enable Thin Provisioning Unmap
|
||||||
|
emulate_tpu: 0
|
||||||
targetPortal: "server[:port]"
|
targetPortal: "server[:port]"
|
||||||
# for multipath
|
# for multipath
|
||||||
targetPortals: [] # [ "server[:port]", "server[:port]", ... ]
|
targetPortals: [] # [ "server[:port]", "server[:port]", ... ]
|
||||||
|
|
|
||||||
|
|
@ -219,6 +219,22 @@ class ControllerZfsGenericDriver extends ControllerZfsBaseDriver {
|
||||||
basename = this.options.iscsi.shareStrategyTargetCli.basename;
|
basename = this.options.iscsi.shareStrategyTargetCli.basename;
|
||||||
let setAttributesText = "";
|
let setAttributesText = "";
|
||||||
let setAuthText = "";
|
let setAuthText = "";
|
||||||
|
let setBlockAttributesText = "";
|
||||||
|
|
||||||
|
if (this.options.iscsi.shareStrategyTargetCli.block) {
|
||||||
|
if (this.options.iscsi.shareStrategyTargetCli.block.attributes) {
|
||||||
|
for (const attributeName in this.options.iscsi
|
||||||
|
.shareStrategyTargetCli.block.attributes) {
|
||||||
|
const attributeValue =
|
||||||
|
this.options.iscsi.shareStrategyTargetCli.block.attributes[
|
||||||
|
attributeName
|
||||||
|
];
|
||||||
|
setBlockAttributesText += "\n";
|
||||||
|
setBlockAttributesText += `set attribute ${attributeName}=${attributeValue}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (this.options.iscsi.shareStrategyTargetCli.tpg) {
|
if (this.options.iscsi.shareStrategyTargetCli.tpg) {
|
||||||
if (this.options.iscsi.shareStrategyTargetCli.tpg.attributes) {
|
if (this.options.iscsi.shareStrategyTargetCli.tpg.attributes) {
|
||||||
for (const attributeName in this.options.iscsi
|
for (const attributeName in this.options.iscsi
|
||||||
|
|
@ -263,6 +279,8 @@ ${setAuthText}
|
||||||
# create extent
|
# create extent
|
||||||
cd /backstores/block
|
cd /backstores/block
|
||||||
create ${assetName} /dev/${extentDiskName}
|
create ${assetName} /dev/${extentDiskName}
|
||||||
|
cd /backstores/block/${assetName}
|
||||||
|
${setBlockAttributesText}
|
||||||
|
|
||||||
# add extent to target/tpg
|
# add extent to target/tpg
|
||||||
cd /iscsi/${basename}:${assetName}/tpg1/luns
|
cd /iscsi/${basename}:${assetName}/tpg1/luns
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue