
With change[1], we introduced an optimized path to upload an RBD volume to image. However, this does not work well when the image format is not 'raw' and conversion is required. Currently there are 2 places where we need handling of the RBDVolumeIOWrapper object: 1. format inspector 2. qemu-img commands While testing, I found out the following issues that needs to be addressed to fix the upload path with conversion: 1. Passing RBDVolumeIOWrapper to format inspector We fail when calling privsep since RPC cannot serialize the RBDVolumeIOWrapper object and fails with the following error ERROR oslo_messaging.rpc.server TypeError: can not serialize 'RBDVolumeIOWrapper' object 2. Handling in format inspector Either we need to pass the volume_fd var to several methods in format inspector code or introduce a condition to find out if we get volume path or RBDVolumeIOWrapper and open it if it's a path 3. Handling in qemu-img commands We need to use rbd:{pool-name}/{image-name} format instead of file path when executing qemu-img commands like convert[2] otherwise we will fail with the below error. Stderr: "qemu-img: Could not open '<os_brick.initiator.linuxrbd.RBDVolumeIOWrapper object at 0x781f747a6aa0>': Could not open '<os_brick.initiator.linuxrbd.RBDVolumeIOWrapper object at 0x781f747a6aa0>': No such file or directory\n" Not to mention passing the volume_fd object to all the qemu related methods and handling cases when volume_path is none and volume_fd contains the RBD IO object. Even after fixing all the issues, it's still not sure that the optimized path offers better performance compared to the traditional workflow as qemu-img will use librbd to read the volume file and convert it to a local path. Due to the above reasons, we only use the optimized path when the image format is same as volume format (i.e. raw) and container format is not 'compressed'. [1] https://review.opendev.org/c/openstack/cinder/+/928024 [2] https://docs.ceph.com/en/latest/rbd/qemu-rbd/#running-qemu-with-rbd Closes-Bug: #2092534 Change-Id: I32b505aa69c71b62e7e3a52d65d38165d34e97d8
OpenStack Cinder
OpenStack Cinder is a storage service for an open cloud computing service.
You can learn more about Cinder at:
Getting Started
If you'd like to run from the master branch, you can clone the git repo:
git clone https://opendev.org/openstack/cinder
If you'd like to contribute, please see the information in CONTRIBUTING.rst
You can raise bugs on Launchpad
Python client
Description
Languages
Python
99.7%
Smarty
0.3%