Public bug reported:
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/ocf/resource.d/heartbeat/iSCSILogicalUnit is not
compatible with the shipped version of openssl:
# To have a reasonably unique default SCSI SN, use the first 8 bytes
# of an MD5 hash of of $OCF_RESOURCE_INSTANCE
sn=`echo -n "${OCF_RESOURCE_INSTANCE}" | openssl md5`
OCF_RESKEY_scsi_sn_default=${sn:0:8}
: ${OCF_RESKEY_scsi_sn=${OCF_RESKEY_scsi_sn_default}}
Recent versions of "openssl md5" have an output of:
"(stdin)= <digest>"
This is fixed in this commit upstream:
https://github.com/ClusterLabs/resource-agents/commit/05119e400fc5aedb8589c7e38dd3cd2d5c748057
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.
** Affects: resource-agents (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1189643
Title:
iSCSILogicalUnit uses default scsi sn of "(stdin)= "
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/resource-agents/+bug/1189643/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs