Fiber Chanel multipath rescan uses wildcards for the host rescan, 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 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 pollute our environment and will
be recognized as down paths when the storage controller reuses the same
WWID.
This patch narrows the rescan to only rescan for the specific lun
number, and if possible it also filters the rescan by HBA channel and
SCSI target ID.
We only filter by HBA channel and SCSI target ID when we can find this
information, and that is when the FC storage servers implement a single
WWNN for all ports.
Reviewed: https:/ /review. openstack. org/349598 /git.openstack. org/cgit/ openstack/ os-brick/ commit/ ?id=28a4d55a0a4 65ac36ed012a2d6 34cb64e8f5d599
Committed: https:/
Submitter: Jenkins
Branch: master
commit 28a4d55a0a465ac 36ed012a2d634cb 64e8f5d599
Author: Gorka Eguileor <email address hidden>
Date: Wed Jul 27 14:06:06 2016 +0200
Fix FC multipath rescan
Fiber Chanel multipath rescan uses wildcards for the host rescan, 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 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 pollute our environment and will
be recognized as down paths when the storage controller reuses the same
WWID.
This patch narrows the rescan to only rescan for the specific lun
number, and if possible it also filters the rescan by HBA channel and
SCSI target ID.
We only filter by HBA channel and SCSI target ID when we can find this
information, and that is when the FC storage servers implement a single
WWNN for all ports.
Change-Id: Id6ed98d3fb8b4b 980de86256dec8e eda84562c98
Closes-Bug: #1608614