]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.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>
Tue, 21 May 2024 18:49:06 +0000 (14:49 -0400)
commit5ddf12772a1fc7be013d81f75d2dc44628aa61a7
tree4949be153bf90651a894deb16ee78aaeab46367f
parent614efdf334973150c6f80d146a0e2b1af6bc33a6
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>
(cherry picked from commit 0bcb5cfce9a242d6f991126524203f90741cfecf)
src/librbd/api/Namespace.cc
src/librbd/api/Pool.cc
src/test/librbd/test_librbd.cc