1a675c9aa1
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
18 lines
869 B
YAML
18 lines
869 B
YAML
---
|
|
upgrade:
|
|
- |
|
|
Cinder now uses the RBD trash functionality to handle some volume deletions.
|
|
Therefore, deployments must either a) enable scheduled RBD trash purging on
|
|
the RBD backend or b) enable the Cinder RBD driver's enable_deferred_deletion
|
|
option to have Cinder purge the RBD trash.
|
|
This adds the new configuration option 'rbd_concurrent_flatten_operations',
|
|
which limits how many RBD flattens the driver will run simultaneously.
|
|
This can be used to prevent flatten operations from consuming too much I/O
|
|
capacity on the Ceph cluster. It defaults to 3.
|
|
fixes:
|
|
- |
|
|
`Bug #1969643 <https://bugs.launchpad.net/cinder/+bug/1969643>`_:
|
|
The RBD driver can now delete volumes with other volumes cloned from it
|
|
(or its snapshots) in cases where deletion would previously fail. This
|
|
uses the RBD trash functionality.
|