543fe8a7d2
Attaching an RBD volume fails when we run the code as root if we are using Python 3. We see a DeviceUnavailable exception: conn.attach() File "/usr/lib/python3.6/site-packages/cinderlib/objects.py", line 842, in attach reason=error_msg) cinder.exception.DeviceUnavailable: The device in the path None is unavailable: Unable to access the backend storage via path /dev/rbd0. The exception message also shows None as the path, even though the description of the exception shows it correctly. The underlying error is a UnicodeDecodeError that happens because when we run as root we open the RBD device directly in Python to check if it is available, but we do it as text, not as binary. This patch changes how we open the file, doing it as binary, and reports the right path on the exception. Closes-Bug: #1873312 Change-Id: I967caa2df84d870c1be4d69f32481fc75c3be010 |
||
---|---|---|
.. | ||
cinder-gate-run.yaml | ||
setup-ceph.yaml | ||
setup-lvm.yaml |