iSCSILogicalUnit uses default scsi sn of "(stdin)= "
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
resource-agents (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Precise |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
According to its documentation iSCSILogicalUnit should generate a default scsi_id by using the first 8 bytes of an md5 hash of the resource name.
However, every created LUN gets the same id of "(stdin)= ".
Software versions:
================
Ubuntu Precise (12.04.2)
resource-agents 1:3.9.2-5ubuntu4.1
openssl 1.0.1-4ubuntu5.9
tgt 1:1.0.17-1ubuntu2
Steps to reproduce:
================
1) Create an iSCSI Target and one iSCSI LUN with crm
2) Display iSCSITarget configuration (e.g. tgtadm --mode target --op show):
3) Expected behaviour:
LUN: 1
Type: disk
SCSI ID: <resource name>
SCSI SN: <first 8 bytes of hash code>
3) Encountered behaviour:
LUN: 1
Type: disk
SCSI ID: <resource name>
SCSI SN: (stdin)=
4) Reason:
The code in /usr/lib/
# To have a reasonably unique default SCSI SN, use the first 8 bytes
# of an MD5 hash of of $OCF_RESOURCE_
sn=`echo -n "${OCF_
OCF_RESKEY_
: ${OCF_RESKEY_
Recent versions of "openssl md5" have an output of:
"(stdin)= <digest>"
This is fixed in this commit upstream:
https:/
I found this bug during testing of iSCSI and multipath failover which lead to filesystem corruptions. While I am not sure if this really is the root cause I would say, that the generation of a static scsi serial number which should be unique justifies a SRU.
Thank you for taking the time to report this bug. In an effort to keep an
up-to-date and valid list of bugs to work on, I have reviewed this report
to verify it still requires effort and occurs on an Ubuntu release in
standard support, and it does not.
This is already fixed in Focal and Precise is EOL.
It is unfortunate that we were unable to resolve this defect, however
there appears to be no further action possible at this time. I am
therefore moving the bug to 'Won't fix'. If you disagree or have
new information, we would be grateful if you could please add a comment
stating why and then change the status of the bug to 'New'.