os-brick/os_brick
Gorka Eguileor d4205bd0be iSCSI: Fix flushing after multipath cfg change
OS-Brick disconnect_volume code assumes that the use_multipath parameter
that is used to instantiate the connector has the same value than the
connector that was used on the original connect_volume call.

Unfortunately this is not necessarily true, because Nova can attach a
volume, then its multipath configuration can be enabled or disabled, and
then a detach can be issued.

This leads to a series of serious issues such as:

- Not flushing the single path on disconnect_volume (possible data loss)
  and leaving it as a leftover device on the host when Nova calls
  terminate-connection on Cinder.

- Not flushing the multipath device (possible data loss) and leaving it
  as a leftover device similarly to the other case.

This patch changes how we do disconnects, now we assume we are always
disconnecting multipaths, and fallback to doing the single path
disconnect we used to do if we can't go that route.

The case when we cannot do a multipathed detach is mostly when we did
the connect as a single path and the Cinder driver doesn't provide
portal_targets and portal_iqns in the connection info for non
multipathed initialize-connection calls.

This changes introduces an additional call when working with single
paths (checking the discoverydb), but it should be an acceptable
trade-off to not lose data.

Closes-Bug: #1921381
Change-Id: I066d456fb1fe9159d4be50ffd8abf9a6d8d07901
2021-03-26 11:07:45 +01:00
..
caches opencas: Use BrickException instead of Exception 2020-12-17 15:21:37 +00:00
encryptors Fix import order of libraries 2021-03-03 16:27:19 -05:00
initiator iSCSI: Fix flushing after multipath cfg change 2021-03-26 11:07:45 +01:00
local_dev Fix import order of libraries 2021-03-03 16:27:19 -05:00
privileged Remove six 2021-03-03 14:41:22 +08:00
remotefs Fix import order of libraries 2021-03-03 16:27:19 -05:00
tests iSCSI: Fix flushing after multipath cfg change 2021-03-26 11:07:45 +01:00
__init__.py doc: Remove cruft from conf.py 2017-08-08 15:44:29 +01:00
exception.py iSCSI: Fix flushing after multipath cfg change 2021-03-26 11:07:45 +01: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 Remove six 2021-03-03 14:41:22 +08:00
version.py Add reno for release notes management 2016-01-20 19:19:36 -06:00