
The recent release of Ceph Pacific saw a change to the clone() logic where invalid values of stripe unit would cause an error to be returned where previous versions would correct the value at runtime. This becomes a problem when creating a volume from an image, where the source RBD image may have a larger stripe unit than cinder's RBD driver is configured for. When this happens, clone() is called with a stripe unit that is too small given that of the source image and the clone fails. The RBD driver in Cinder has a configuration parameter 'rbd_store_chunk_size' that stores the preferred object size for cloned images. If clone() is called without a stripe_unit passed in, the stripe unit defaults to the object size, which is 4MB by default. The issue arises when creating a volume from a Glance image, where Glance is creating images with a default stripe unit of 8MB (distinctly larger than that of Cinder). If we do not consider the incoming stripe unit and select the larger of the two, Ceph cannot clone an RBD image with a smaller stripe unit and raises an error. This patch adds a function in our driver's clone logic to select the larger of the two stripe unit values so that the appropriate stripe unit is chosen. It should also be noted that we're determining the correct stripe unit, but using the 'order' argument to clone(). Ceph will set the stripe unit equal to the object size (order) by default and we rely on this behaviour for the following reason: passing stripe-unit alone or with an order argument causes an invalid argument exception to be raised in pre-pacific releases of Ceph, as it's argument parsing appears to have limitations. Closes-Bug: #1931004 Change-Id: Iec111ab83e9ed8182c9679c911e3d90927d5a7c3
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%