Volume discovery and local storage management lib
Go to file
Stephen Finucane ee34d925ff rbd: Warn if ceph udev rules are not configured
The LUKS encryptor feature expects devices to have a symbolic link that
it can overwrite in order to enable transparent encryption/decryption
for instances [1]. This is generally the case for RBD volumes, as Ceph
uses udev rules [2] to create a '/dev/rbd/{pool}/{device}' ->
'/dev/rbdN' symlink. However, in an environment where udev daemon is not
present or configured correctly, this symlink will never be configured.
This causes things to crash and burn in a rather non-obvious manner when
locally attaching an encrypted RBD volume:

  oslo_concurrency.processutils.ProcessExecutionError: Unexpected error while running command.
  Command: cryptsetup luksOpen --key-file=- /dev/rbd/volumes/volume-foo crypt-volume-foo
  Exit code: 4
  Stdout: ''
  Stderr: "Device /dev/rbd/volumes/foo doesn't exist or access denied.\n"

('foo' being a stand-in for a very long 'device-$UUID' name)

The long term fix here is to probably stop relying on the side effects
of these udev rules, i.e. the symlinks, but that is a far more involved
fix that would not be backportable. Instead, for now we simply leave a
breadcrumb for the user, informing them as to what's gone wrong and
encouraging them to look at the bug report for more information.

[1] https://github.com/openstack/os-brick/blob/3.1.0/os_brick/encryptors/luks.py#L191-L195
[2] https://github.com/ceph/ceph/blob/v14.0.0/udev/50-rbd.rules

Change-Id: I2775f55039695c7ec029106c0dafe4d46255b336
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Related-Bug: #1884114
2020-07-27 13:18:02 +01:00
doc Switch to newer openstackdocstheme and reno versions 2020-05-21 17:10:15 +02:00
etc/os-brick/rootwrap.d Trivial rootwrap -> privsep replacement 2016-04-15 15:29:25 +00:00
os_brick rbd: Warn if ceph udev rules are not configured 2020-07-27 13:18:02 +01:00
releasenotes rbd: Support 'rbd showmapped' output from ceph 13.2.0+ 2020-06-19 18:38:25 +01:00
tools Stop to use the __future__ module. 2020-06-02 20:35:29 +02:00
.coveragerc Fix coverage generation 2016-04-20 15:52:31 +00:00
.gitignore Add LIO barbican tests to .zuul.yaml 2018-10-01 10:19:36 -05: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 Merge "Add NFS tempest job to check queue" 2020-04-28 22:23:17 +00: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
README.rst Replace git.openstack.org URLs with opendev.org URLs 2019-04-23 20:55:14 +08:00
bindep.txt Add iscsi-initiator-utils requirement 2020-06-08 09:26:20 -04:00
lower-constraints.txt Update lower-constraints versions 2020-06-09 13:39:16 -05:00
pylintrc Add pylint tox env 2016-04-04 18:02:19 -04:00
requirements.txt Update lower-constraints versions 2020-06-09 13:39:16 -05:00
setup.cfg Merge "Add py38 package metadata" 2020-05-03 14:08:49 +00:00
setup.py Cleanup py27 support 2020-04-05 17:43:12 +02:00
test-requirements.txt Bump pycodestyle to 2.6.0 2020-06-09 13:40:48 -05:00
tox.ini Add dependencies to releasenotes environment 2020-05-29 22:15:27 -04:00

README.rst

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-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:

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