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)