]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
librbd/image: create rbd_trash object during RBD pool initialization
authorRamana Raja <rraja@redhat.com>
Tue, 30 Apr 2024 17:56:12 +0000 (13:56 -0400)
committerRamana Raja <rraja@redhat.com>
Wed, 15 May 2024 19:32:15 +0000 (15:32 -0400)
commit0bcb5cfce9a242d6f991126524203f90741cfecf
tree5bd778ad21e20f01998aff1d29979c992ef4e545
parentbdc50a9720276fa38d30b4f1aa23143333b861be
librbd/image: create rbd_trash object during RBD pool initialization

... and RBD namespace creation.

It was not possible to remove a RBD image when OSDs were full and the
'rbd_trash' object was not already created in the image's pool or pool
namespace. The 'rbd_trash' object was created in a pool or namespace
during the first instance of image removal from the pool or namespace.
If no images were ever removed from a RBD pool or namespace and the
OSDs became full, removal of images using the CLI failed. The failure
occured when trying to move the images to trash since the 'rbd_trash'
object was missing in the pool or namespace.

Fix this issue by creating the rbd_trash object in a pool when
initalizing the pool as a RBD pool and when creating a RBD namespace.

Fixes: https://tracker.ceph.com/issues/64800
Signed-off-by: Ramana Raja <rraja@redhat.com>
src/librbd/api/Namespace.cc
src/librbd/api/Pool.cc
src/test/librbd/test_librbd.cc