os-brick/os_brick/initiator
Gorka Eguileor b75411de2b Succeed on iSCSI detach when path just went down
If the iSCSI connection to a device goes down right after we flush it,
or if one of the paths of a multipath device goes down right before we
start disconnecting, the detach will fail even though it should succeed.

We'll see a VolumePathNotRemoved exception listing volumes that had not
disappeared.

This happens because, under those circumstances, it may take up to 30
seconds for the SCSI device to be removed from /dev, but expect it to
disappear in 6 seconds (first check happens, immediately, then another
in 2 seconds, and another in 4 seconds).

Since the device will be removed if we wait a bit more, this patch makes
it so that we wait for up to 30 seconds for the removal.

To ensure we wait as little time as possible, we change the way we wait
for the devices to be removed.  Instead of checking, sleeping for 2 and
then for 4 seconds, and then checking again, we just sleep 500ms between
checks, and we do the DEBUG log every 5 seconds.

Change-Id: If801dfc2462c0d3f986eebd4108087139934610d
Closes-Bug: #1794829
(cherry-picked from b9c7bc2b59)
2018-10-01 16:39:11 -04:00
..
connectors Fix multipath disconnect with path failure 2018-08-21 09:26:43 -05:00
windows Windows SMBFS: avoid mounting local shares by default 2018-07-11 15:02:14 +03:00
__init__.py Add the StorPool brick connector 2017-12-01 23:06:15 +02:00
connector.py adding sheepdog connector for PPC64 2018-04-18 23:08:17 -03:00
host_driver.py Fix race in check and access of /dev/disk/by-path/ 2015-07-28 18:30:06 +02:00
initiator_connector.py Refactor iSCSI disconnect 2017-05-31 15:31:20 +02:00
linuxfc.py FC Allow for multipath volumes with different LUNs 2018-07-16 10:31:52 -07:00
linuxrbd.py Merge "Add attribute 'name' to class RBDVolume." 2017-10-10 03:41:31 +00:00
linuxscsi.py Succeed on iSCSI detach when path just went down 2018-10-01 16:39:11 -04:00
linuxsheepdog.py Remove unused LOG to keep code clean 2016-07-09 10:17:48 +08:00