RBD: Unable to delete a volume which has snapshot/volume children
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Cinder |
Fix Released
|
Medium
|
Eric Harney | |||
cinder (Ubuntu) | Status tracked in Oracular | |||||
Jammy |
In Progress
|
Undecided
|
Chengen Du | |||
Mantic |
Won't Fix
|
Undecided
|
Unassigned | |||
Noble |
Fix Released
|
Undecided
|
Unassigned | |||
Oracular |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
Deleting a volume will fail if it has snapshot or volume children, resulting in an ImageBusy error.
[Fix]
Upstream has a patch that uses RBD flatten operations to break dependencies between volumes and snapshots, reducing failures when using RBD volume clones and snapshots.
commit 1a675c9aa178c6d
Author: Eric Harney <email address hidden>
CommitDate: Fri Dec 1 10:17:05 2023 -0500
RBD: Flattening of child volumes during deletion
[Test Plan]
Here are the common steps for testing.
1. Prepare an OpenStack environment with cinder-ceph
2. Create a volume named "vol"
openstack volume create --image jammy --size 10 vol
3. Create a snapshot of the volume "vol"
openstack volume snapshot create --volume vol vol-snap
4. Create a volume named "vol-copy" from the snapshot
openstack volume create --snapshot vol-snap vol-copy
5. Delete the snapshot and then delete the volume "vol"
openstack volume snapshot delete vol-snap
openstack volume delete vol
6. Confirm that the volume "vol" is successfully deleted
openstack volume list
There are two test scenarios:
- Enable RBD flatten operations:
1. Use `juju ssh` to log in to the cinder-volume and add "enable_
2. Restart the cinder-volume service using the command `systemctl restart cinder-volume`.
3. Follow the common steps, and all steps should pass.
- Disable RBD flatten operations:
1. Ensure that "enable_
2. Follow the common steps, and the process should fail at step 5 with an ImageBusy error.
[Where problems could occur]
The patch primarily modifies the workflow for volume deletion when using RBD as the backend and adds a retry mechanism for unprotecting snapshots during snapshot deletion.
To prevent any performance regressions, we have also introduced a configuration option to enable the RBD flatten operations, which defaults to false.
If the patch has any undiscovered issues, it will only affect volume deletion. Other functionalities or non-RBD backends will not be impacted.
tags: | added: drivers rbd |
Changed in cinder: | |
importance: | Undecided → Medium |
assignee: | nobody → Eric Harney (eharney) |
description: | updated |
description: | updated |
Changed in cinder (Ubuntu Mantic): | |
status: | New → Won't Fix |
Changed in cinder (Ubuntu Noble): | |
status: | New → Fix Released |
Changed in cinder (Ubuntu Oracular): | |
status: | New → Fix Released |
description: | updated |
Fix proposed to branch: master /review. opendev. org/c/openstack /cinder/ +/838756
Review: https:/