Files
os-brick/releasenotes/notes/disconnect-multipath-cfg-changed-637abc5ecf44fb10.yaml
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

7 lines
221 B
YAML

---
fixes:
- |
`Bug #1921381 <https://bugs.launchpad.net/cinder/+bug/1921381>`_: Fix
disconnecting volumes when the use_multipath value is changed from the
connect_volume call to the disconnect_volume call.