commit a6e789f27edc5cae84a786f3d3604cc6546820d7
Author: Gorka Eguileor <email address hidden>
Date: Sun Feb 12 01:58:46 2017 +0100
Fix iSCSI multipath rescan
iSCSI multipath rescan uses iscsiadm --rescan option for nodes and
sessions, which can end up recreating devices that had just been removed
if there's a race condition between the removal of a SCSI device and the
connection of a volume.
The race condition happens if a rescan done when attaching happens right
between us removing the path and removing the exported lun, because the
rescan will add not only the new path we are attaching, but the old path
we are removing, since the lun still hasn't been removed.
This would leave orphaned devices that unnecessarily pollute our
environment,
This patch narrows the rescan to only rescan for the specific target id,
channel, and lun number if we can find this information.
When we cannot find this information we do the scan as we were doing it
before.
Reviewed: https:/ /review. openstack. org/433104 /git.openstack. org/cgit/ openstack/ os-brick/ commit/ ?id=a6e789f27ed c5cae84a786f3d3 604cc6546820d7
Committed: https:/
Submitter: Jenkins
Branch: master
commit a6e789f27edc5ca e84a786f3d3604c c6546820d7
Author: Gorka Eguileor <email address hidden>
Date: Sun Feb 12 01:58:46 2017 +0100
Fix iSCSI multipath rescan
iSCSI multipath rescan uses iscsiadm --rescan option for nodes and
sessions, which can end up recreating devices that had just been removed
if there's a race condition between the removal of a SCSI device and the
connection of a volume.
The race condition happens if a rescan done when attaching happens right
between us removing the path and removing the exported lun, because the
rescan will add not only the new path we are attaching, but the old path
we are removing, since the lun still hasn't been removed.
This would leave orphaned devices that unnecessarily pollute our
environment,
This patch narrows the rescan to only rescan for the specific target id,
channel, and lun number if we can find this information.
When we cannot find this information we do the scan as we were doing it
before.
Closes-Bug: #1664032 5a6ea9ca061f946 d6dfcf8553f
Change-Id: I1b3bd34db26016