os-brick/os_brick/tests/initiator
Gorka Eguileor a6e789f27e 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
Change-Id: I1b3bd34db260165a6ea9ca061f946d6dfcf8553f
2017-02-27 16:56:28 +01:00
..
connectors Fix iSCSI multipath rescan 2017-02-27 16:56:28 +01:00
__init__.py renamed the project to os-brick 2015-02-05 23:58:37 +00:00
test_connector.py Raise specific exception for an invalid protocol connector 2016-11-04 18:07:06 -04:00
test_host_driver.py Fix race in check and access of /dev/disk/by-path/ 2015-07-28 18:30:06 +02:00
test_linuxfc.py Detect if Fibre Channel support exists 2016-10-05 03:31:03 -07:00
test_linuxrbd.py Close connection to ceph after cinder bakcup 2016-09-30 13:02:00 +00:00
test_linuxscsi.py Retry multipath flush when map is in use 2017-02-27 16:56:28 +01:00
test_linuxsheepdog.py Add sheepdog support 2016-02-19 04:57:12 +00:00