Volume discovery and local storage management lib
Go to file
Gorka Eguileor 00caa73776 RBD: Improve close and flush in IOWrapper
On Change-Id Ib3b066a7da071b1c2de78a1a4e569676539bd335 we improved the
RBDVolumeIOWrapper's flush and close methods, and this patch improves
them even further.

If the IOWrapper's close is not explicitly called and it's just
dereferenced (happens in unit tests) then during Garbage Collection the
wrapped image may be destroyed before the wrapper, which would trigger
the image being closed without the wrapper knowing, so when the wrapper
gets destroyed it will fail because it calls its close method, which
calls its flush, which calls the underlying image's flush, which will
fail because the underlying image was already closed.

We need to check if the underlying image has already being flushed
before calling the flush.

Calling the underlying close method for the Image or IOWrapper classes
is not a problem because they are idempotent.

Change-Id: Ib5a517d58427df0d1d1b22ad3dc66f673da147fe
2023-08-23 12:33:37 +02:00
doc [docs] add autodoc_mock_imports 2023-07-21 08:27:57 -04:00
etc/os-brick/rootwrap.d Trivial rootwrap -> privsep replacement 2016-04-15 15:29:25 +00:00
os_brick RBD: Improve close and flush in IOWrapper 2023-08-23 12:33:37 +02:00
releasenotes Merge "Fix multipath resize map with friendly names" 2023-08-17 00:56:26 +00:00
tools mypy: work around mypy bug #13214 2022-08-18 14:04:26 -04:00
.coveragerc Fix coverage generation 2016-04-20 15:52:31 +00:00
.gitignore Add mypy-report directory to .gitignore 2022-08-25 09:03:04 -04:00
.gitreview OpenDev Migration Patch 2019-04-19 19:34:25 +00:00
.mailmap Created the Brick library from Cinder 2015-01-22 19:09:30 +00:00
.stestr.conf Add .stestr.conf configuration 2017-10-02 17:35:26 -05:00
.zuul.yaml Add Python3 antelope unit tests 2022-09-09 10:27:46 +00:00
bindep.txt bindep: remind people to sync the dependencies with devstack 2020-08-14 00:50:08 +02:00
CONTRIBUTING.rst Ussuri contrib docs community goal 2020-03-05 09:11:33 -05:00
HACKING.rst Update hacking version 2019-01-18 21:30:00 -05:00
LICENSE Created the Brick library from Cinder 2015-01-22 19:09:30 +00:00
mypy-files.txt mypy: lvm.py 2022-08-25 14:00:42 +00:00
pylintrc Add pylint tox env 2016-04-04 18:02:19 -04:00
README.rst Update README to drop py3.6 reference 2022-07-12 13:56:33 -04:00
requirements.txt Update minimum requirements in os-brick 2023-02-09 15:55:40 +00:00
setup.cfg Merge "Set packages in setup.cfg" 2023-04-21 16:39:09 +00:00
setup.py Cleanup py27 support 2020-04-05 17:43:12 +02:00
test-requirements.txt Bump mypy to 1.2.0 2023-05-02 09:35:21 -04:00
tox.ini Bump bandit to release 1.7.0 2023-01-25 10:17:21 -05:00

Team and repository tags

image

brick

Latest Version

Downloads

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 3.8+. A recent tox is required, as is a recent virtualenv (20.2.2 or newer).

For any other information, refer to the developer documents:

https://docs.openstack.org/os-brick/latest/

OR refer to the parent project, Cinder:

https://docs.openstack.org/cinder/latest/

Release notes for the project can be found at:

https://docs.openstack.org/releasenotes/os-brick