cinder/releasenotes
Rajat Dhasmana 7d32076498 RBD: Fix upload volume with different format
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
2024-12-26 20:38:48 +05:30
..
2024-12-17 03:28:06 +00:00
2017-07-25 14:24:18 -07:00

Release notes

The release notes for a patch should be included in the patch. The intended audience for release notes include deployers, administrators and end-users.

A release note is required if the patch has upgrade or API impact. It is also required if the patch adds a feature or fixes a long-standing or security bug.

Please see https://docs.openstack.org/cinder/latest/contributor/releasenotes.html for more details.