64 char limit on SCALE extent names
This commit is contained in:
parent
0dc3ecccdf
commit
f27a359f7c
|
|
@ -29,3 +29,10 @@ iscsi:
|
|||
targetGroupAuthGroup:
|
||||
# 0-100 (0 == ignore)
|
||||
extentAvailThreshold: 0
|
||||
|
||||
# https://github.com/SCST-project/scst/blob/master/scst/src/dev_handlers/scst_vdisk.c#L203
|
||||
_private:
|
||||
csi:
|
||||
volume:
|
||||
idHash:
|
||||
strategy: crc16
|
||||
|
|
|
|||
|
|
@ -29,3 +29,10 @@ iscsi:
|
|||
targetGroupAuthGroup:
|
||||
# 0-100 (0 == ignore)
|
||||
extentAvailThreshold: 0
|
||||
|
||||
# https://github.com/SCST-project/scst/blob/master/scst/src/dev_handlers/scst_vdisk.c#L203
|
||||
_private:
|
||||
csi:
|
||||
volume:
|
||||
idHash:
|
||||
strategy: crc16
|
||||
|
|
|
|||
|
|
@ -685,6 +685,7 @@ class FreeNASApiDriver extends CsiBaseDriver {
|
|||
// According to RFC3270, 'Each iSCSI node, whether an initiator or target, MUST have an iSCSI name. Initiators and targets MUST support the receipt of iSCSI names of up to the maximum length of 223 bytes.'
|
||||
// https://kb.netapp.com/Advice_and_Troubleshooting/Miscellaneous/What_is_the_maximum_length_of_a_iSCSI_iqn_name
|
||||
// https://tools.ietf.org/html/rfc3720
|
||||
// https://github.com/SCST-project/scst/blob/master/scst/src/dev_handlers/scst_vdisk.c#L203
|
||||
iscsiName = iscsiName.toLowerCase();
|
||||
|
||||
let extentDiskName = "zvol/" + datasetName;
|
||||
|
|
@ -702,6 +703,14 @@ class FreeNASApiDriver extends CsiBaseDriver {
|
|||
);
|
||||
}
|
||||
|
||||
// https://github.com/SCST-project/scst/blob/master/scst/src/dev_handlers/scst_vdisk.c#L203
|
||||
if (isScale && iscsiName.length > 64) {
|
||||
throw new GrpcError(
|
||||
grpc.status.FAILED_PRECONDITION,
|
||||
`extent name cannot exceed 64 characters: ${iscsiName}`
|
||||
);
|
||||
}
|
||||
|
||||
this.ctx.logger.info(
|
||||
"FreeNAS creating iscsi assets with name: " + iscsiName
|
||||
);
|
||||
|
|
|
|||
|
|
@ -733,6 +733,7 @@ class FreeNASSshDriver extends ControllerZfsBaseDriver {
|
|||
// According to RFC3270, 'Each iSCSI node, whether an initiator or target, MUST have an iSCSI name. Initiators and targets MUST support the receipt of iSCSI names of up to the maximum length of 223 bytes.'
|
||||
// https://kb.netapp.com/Advice_and_Troubleshooting/Miscellaneous/What_is_the_maximum_length_of_a_iSCSI_iqn_name
|
||||
// https://tools.ietf.org/html/rfc3720
|
||||
// https://github.com/SCST-project/scst/blob/master/scst/src/dev_handlers/scst_vdisk.c#L203
|
||||
iscsiName = iscsiName.toLowerCase();
|
||||
|
||||
let extentDiskName = "zvol/" + datasetName;
|
||||
|
|
@ -747,7 +748,15 @@ class FreeNASSshDriver extends ControllerZfsBaseDriver {
|
|||
if (extentDiskName.length > maxZvolNameLength) {
|
||||
throw new GrpcError(
|
||||
grpc.status.FAILED_PRECONDITION,
|
||||
`extent disk name cannot exceed ${maxZvolNameLength} characters: ${extentDiskName}`
|
||||
`extent disk name cannot exceed ${maxZvolNameLength} characters: ${extentDiskName}`
|
||||
);
|
||||
}
|
||||
|
||||
// https://github.com/SCST-project/scst/blob/master/scst/src/dev_handlers/scst_vdisk.c#L203
|
||||
if (isScale && iscsiName.length > 64) {
|
||||
throw new GrpcError(
|
||||
grpc.status.FAILED_PRECONDITION,
|
||||
`extent name cannot exceed 64 characters: ${iscsiName}`
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue