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-11-05 18:41:59 +00:00
2023-04-18 19:45:55 +00:00
2021-06-04 17:21:28 -04:00
2024-10-24 20:08:04 +00:00
2019-04-19 19:26:48 +00:00
2023-01-20 10:28:08 -05:00
2017-10-10 00:46:42 +00:00
2023-08-18 18:55:23 -04:00
2023-09-14 15:18:58 -04:00
2012-05-03 10:48:26 -07:00
2020-01-22 11:44:36 +00:00
2024-04-10 10:42:25 -04:00
2020-04-17 14:47:10 +02:00
2024-10-13 01:27:59 +09:00

OpenStack Cinder

image

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

Python Cinderclient

Description
OpenStack Block Storage (Cinder)
Readme 913 MiB
Languages
Python 99.7%
Smarty 0.3%