OpenStack Block Storage (Cinder)
Go to file
Eric Harney 1a675c9aa1 RBD: Flattening of child volumes during deletion
This patch allows delete_volume and delete_snapshot calls
to fail less often when using RBD volume clones and snapshots.

RBD clone v2 support allows remove() to pass in situations
where it would previously fail, but it still fails with an
ImageBusy error in some situations.  For example:

 volume1
   -> snapshot s1 of volume 1
     -> volume2 cloned from snapshot 1
Deleting snapshot s1 would fail with ImageBusy.

This is fixed by using RBD flatten operations to break
dependencies between volumes/snapshots and other RBD volumes
or snapshots.

Delete now works as follows:
  1. Attempt RBD remove()
     This is the "fast path" for removing a simple volume
     that involves no extra overhead.
  2. If busy and the volume has child dependencies,
     flatten those dependencies with RBD flatten()
  3. Attempt RBD remove() again
     This will succeed in more cases than (1) would have.
  4. If remove() failed, use trash_move() instead to move
     the image to the trash instead.
     This allows Cinder deletion of a volume (volume1) to proceed
     in the scenario where volume2 was cloned from snapshot s1 of
     volume1, and snapshot s1 has been trashed and not fully
     deleted from the RBD backend.  (Snapshots in the trash
     namespace are no longer visible but are still in the
     dependency chain.)

This allows Cinder deletions to succeed in most scenarios where
they would previously fail.

In cases where a .clone_snap snapshot is present, we still do a
rename to .deleted instead of deleting/trashing the volume.  This
should be worked on further in a follow-up as it is likely not
necessary most of the time.

A new configuration option, rbd_concurrent_flatten_operations, was
introduced to limit how many flatten calls can be made at the same time.
This is to prevent overloading the backend. The default value is 3.

Co-Authored-By: Eric Harney <eharney@redhat.com>
Co-Authored-By: Sofia Enriquez <lsofia.enriquez@gmail.com>

Closes-Bug: #1969643
Change-Id: I009d0748fdc829ca0b4f99bc9b70dadd19717d04
2023-12-01 10:17:05 -05:00
api-ref/source api-ref: Improve sort, pagination parameter docs 2023-08-28 15:56:03 +01:00
cinder RBD: Flattening of child volumes during deletion 2023-12-01 10:17:05 -05:00
doc Merge "Reference - Documentation correction" 2023-09-14 15:48:29 +00:00
etc/cinder Add Cinder NFS driver for Dell PowerStore 2022-07-28 01:27:22 -07:00
playbooks Add fips check jobs 2023-04-18 19:45:55 +00:00
rally-jobs Remove Block Storage API v2 2021-06-04 17:21:28 -04:00
releasenotes RBD: Flattening of child volumes during deletion 2023-12-01 10:17:05 -05:00
roles Native multibackend-matrix Zuul v3 job 2021-09-08 01:05:44 +02:00
tools Add fips check jobs 2023-04-18 19:45:55 +00:00
.coveragerc Update .coveragerc after the removal of openstack directory 2016-10-17 19:09:37 +05:30
.gitignore db: Enable auto-generation of database migrations 2022-02-20 19:06:01 +00:00
.gitreview OpenDev Migration Patch 2019-04-19 19:26:48 +00:00
.pylintrc Pylint: add nvmet to ignored-modules 2023-01-20 10:28:08 -05:00
.stestr.conf Add .stestr.conf configuration 2017-10-10 00:46:42 +00:00
.zuul.yaml Merge "Make lvm-lio-barbican a canary job" 2023-09-28 01:30:18 +00:00
bindep.txt Use openstack-tox-py311 job 2023-08-18 18:55:23 -04:00
CONTRIBUTING.rst Ussuri contrib docs community goal 2020-03-05 14:11:48 -05:00
driver-requirements.txt Add install docs for LINSTOR driver dependencies 2022-12-15 09:40:06 +01:00
HACKING.rst Use LOG.warning instead of deprecated LOG.warn 2022-02-09 08:29:02 +09:00
LICENSE Initial fork out of Nova. 2012-05-03 10:48:26 -07:00
mypy-files.txt mypy: Cover cinder/flow_utils.py 2023-06-05 14:31:04 +00:00
README.rst Merge "Refactor README links" 2020-01-22 11:44:36 +00:00
reno.yaml Update release note info 2021-04-16 11:11:41 -04:00
requirements.txt Merge "db: Remove legacy migrations" 2023-05-23 10:50:52 +00:00
setup.cfg Set packages in setup.cfg 2023-03-17 21:02:58 +00:00
setup.py Cleanup py27 support 2020-04-17 14:47:10 +02:00
test-requirements.txt Bump mypy to 1.2.0 2023-04-26 11:32:12 -04:00
tox.ini Bump pylint to 2.17.0 2023-03-09 15:56:50 -05: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