[Bug 1969643] Re: RBD: Unable to delete a volume which has snapshot/volume children

Edward Hope-Morley 1969643 at bugs.launchpad.net
Mon Jun 24 14:33:55 UTC 2024


Thanks @mfo i think your two concerns are valid. This patch does create
the risk that a user, in deleting a single volume, could overwhelm the
Ceph cluster. It is not uncommon for production Ceph clusters to be
reasonably full and with this patch if you happen to delete a large
volume that has a large number of clones it could tip your cluster usage
over the edge without any warning. I feel somewhat that what the patch
is addressing is more an issue of convenience than a bug and while it is
nice to be leveraging the trash feature of rbd v2, I think that to make
this patch really same some guardrails should be put in place. I would
recommend at least having a (configurable) limit to the number of clones
a volume is allowed to have (and perhaps taking into account size) in
order for auto-flattening to be allowed.

To Mauricio's second point, given that in order to implement this
properly you need to also consider how and when your trashed images are
deleted, it might have been safer to make this an optional feature,
defaulting to disabled so that the necessary pre-requisites/changes can
be put in place before it is enabled.

I am therefore not hugely in favour of backporting this patch as-is and
perhaps if we can focus on addressin some of the safety concerns raised
we could reconsider it later.

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to cinder in Ubuntu.
https://bugs.launchpad.net/bugs/1969643

Title:
  RBD: Unable to delete a volume which has snapshot/volume children

Status in Cinder:
  Fix Released
Status in cinder package in Ubuntu:
  Fix Released
Status in cinder source package in Jammy:
  Incomplete
Status in cinder source package in Mantic:
  Won't Fix
Status in cinder source package in Noble:
  Fix Released
Status in cinder source package in Oracular:
  Fix Released

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 1a675c9aa178c6d9c6ed10fd98f086c46d350d3f
  Author:     Eric Harney <eharney at redhat.com>
  CommitDate: Fri Dec 1 10:17:05 2023 -0500

      RBD: Flattening of child volumes during deletion

  [Test Plan]
  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
  # ^ This would fail with ImageBusy previously (see patch's "For example")
  openstack volume delete vol
  # ^ This would possibly fail previously (see patch's step "4.")
  6. Confirm that the volume "vol" is successfully deleted
  openstack volume list

  [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.
  If the patch has any undiscovered issues, it will only affect volume deletion. Other functionalities or non-RBD backends will not be impacted.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cinder/+bug/1969643/+subscriptions




More information about the Ubuntu-openstack-bugs mailing list