cinder/releasenotes
Jon Bernard 7fd4d46a8e RBD: use correct stripe unit in clone operation
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
(cherry picked from commit 49a2c85eda)
(cherry picked from commit 5db58159fe)
Conflicts:
	cinder/tests/unit/volume/drivers/test_rbd.py
(cherry picked from commit 07ead73eec)
(cherry picked from commit 06b32da4be)
Conflicts:
	cinder/tests/unit/volume/drivers/test_rbd.py
2021-09-15 15:07:53 +02:00
..
notes RBD: use correct stripe unit in clone operation 2021-09-15 15:07:53 +02:00
source Imported Translations from Zanata 2019-10-04 06:44:38 +00:00
README.rst Fix release notes link 2017-07-25 14:24:18 -07:00

README.rst

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.