Comment 8 for bug 1941815

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/cinder/+/811151
Committed: https://opendev.org/openstack/cinder/commit/50f4dd044508f3ff9701e1e17ccd65a89db6a7aa
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 50f4dd044508f3ff9701e1e17ccd65a89db6a7aa
Author: Sofia Enriquez <email address hidden>
Date: Tue Aug 24 21:02:31 2021 +0000

    RBD: Call trash operation when plain deletion fails

    Currently RBD doesn't allow deleting volumes with snapshots or volume
    dependencies. This causes Cinder API errors on delete calls that should
    succeed.

    When using the RBD v2 clone api, deleting a volume that has a snapshot
    in the trash space raises a busy exception.

    In order to solve this, this patch removes the proactive VolumeIsBusy
    exception raise and calls the trash operation which should succeed when
    the volume has dependencies.

    In addition to this code it's important to enable the Ceph Trash auto
    purge. Otherwise Ceph may end up with a couple of images in trash
    namespace for a while. However, this approach is the lesser of 2 evils
    because the user will be able to delete volumes with dependencies
    while the operator could check the trash namespace and manually purge
    the images. It is definitely better to potentially trouble 1 person
    (operator) that didn't read the release notes once than troubling
    every single user.

    Closes-Bug: #1941815
    Co-Author: Eric Harney <email address hidden>
    Change-Id: I5dbbcca780017b358600016afca8a9424aa137fd
    (cherry picked from commit 5226a13d149ffd991744f37618a06267eadb5f49)