d4205bd0be
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 |
||
---|---|---|
.. | ||
caches | ||
encryptors | ||
initiator | ||
local_dev | ||
privileged | ||
remotefs | ||
tests | ||
__init__.py | ||
exception.py | ||
executor.py | ||
i18n.py | ||
utils.py | ||
version.py |