os-brick/os_brick
Gorka Eguileor 9722aa7db8 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 commit b9c7bc2b59)
(cherry picked from commit b75411de2b)
2018-10-03 12:26:03 -04:00
..
encryptors Make close on cryptsetup volumes idempotent 2017-11-18 00:19:42 +00:00
initiator Succeed on iSCSI detach when path just went down 2018-10-03 12:26:03 -04:00
local_dev Remove the unnecessary pv_list assign during LVM object init 2018-01-11 00:59:31 +00:00
privileged Refactor iSCSI connect 2017-06-16 16:09:35 +02:00
remotefs RemoteFS: don't fail in do_mount if already mounted 2018-07-17 13:37:45 +00:00
tests Succeed on iSCSI detach when path just went down 2018-10-03 12:26:03 -04:00
__init__.py doc: Remove cruft from conf.py 2017-08-08 15:44:29 +01:00
exception.py Refactor iSCSI connect 2017-06-16 16:09:35 +02:00
executor.py iSCSI multipath: improve logging on connect 2017-06-26 20:31:59 +02:00
i18n.py Update and replace http with https for doc links 2017-07-26 02:18:44 +00:00
utils.py Mask passwords in utils.trace for func params 2016-11-08 12:55:46 -05:00
version.py Add reno for release notes management 2016-01-20 19:19:36 -06:00