9528ceab4f
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. Also includes squash to add release note from: Add release note prelude for os-brick 4.4.0 Change-Id: I0f9e088fbb14ee9a73175aa31bca8c619db5a96f Closes-Bug: #1921381 Change-Id: I066d456fb1fe9159d4be50ffd8abf9a6d8d07901 (cherry picked from commit |
||
---|---|---|
doc | ||
etc/os-brick/rootwrap.d | ||
os_brick | ||
releasenotes | ||
tools | ||
.coveragerc | ||
.gitignore | ||
.gitreview | ||
.mailmap | ||
.stestr.conf | ||
.zuul.yaml | ||
CONTRIBUTING.rst | ||
HACKING.rst | ||
LICENSE | ||
README.rst | ||
bindep.txt | ||
lower-constraints.txt | ||
pylintrc | ||
requirements.txt | ||
setup.cfg | ||
setup.py | ||
test-requirements.txt | ||
tox.ini |
README.rst
Team and repository tags
brick
OpenStack Cinder brick library for managing local volume attaches
Features
- Discovery of volumes being attached to a host for many transport protocols.
- Removal of volumes from a host.
Hacking
Hacking on brick requires python-gdbm (for Debian derived distributions), Python 2.7 and Python 3.4. A recent tox is required, as is a recent virtualenv (13.1.0 or newer).
If "tox -e py34" fails with the error "db type could not be determined", remove the .testrepository/ directory and then run "tox -e py34".
- For any other information, refer to the developer documents:
- OR refer to the parent project, Cinder:
- Release notes for the project can be found at:
- License: Apache License, Version 2.0
- Source: https://opendev.org/openstack/os-brick
- Bugs: https://bugs.launchpad.net/os-brick