Skip to content

quincy: librbd: create rbd_trash object during pool initialization and namespace creation - #57604

Merged
yuriw merged 3 commits into
ceph:quincyfrom
ajarr:wip-66115-quincy
Jul 12, 2024
Merged

yuriw merged 3 commits into
ceph:quincyfrom
ajarr:wip-66115-quincy

Conversation

@ajarr

@ajarr ajarr commented May 21, 2024

Copy link
Copy Markdown
Contributor

ajarr added 3 commits May 21, 2024 14:50
... of rbd namespace creation.

During rbd namespace creation, the image directory object may leak if
the initalization of the image directory fails. Initialization of image
directory involves creation of the rbd_directory object and a state
being set in the object's omap. After creation of the object, error
can occur when setting the state in the object's omap. This would fail
the rbd namespace creation and leave behind the rbd_directory object.
So try to remove the rbd_directory object when rolling back namespace
creation.

Signed-off-by: Ramana Raja <[email protected]>
(cherry picked from commit bdc50a9)
... 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 <[email protected]>
(cherry picked from commit 0bcb5cf)
'rbd_validate_pool' option is for testing purposes only. So change
its level appropriately to 'dev'.

Signed-off-by: Ramana Raja <[email protected]>
(cherry picked from commit 4117b8e)
@ajarr
ajarr requested a review from a team as a code owner May 21, 2024 18:50
@ajarr ajarr added this to the quincy milestone May 21, 2024
@ajarr ajarr added the rbd label May 21, 2024
@idryomov

Copy link
Copy Markdown
Contributor

jenkins test make check

@cbodley cbodley modified the milestones: v17.2.8, quincy Jun 5, 2024
@idryomov

idryomov commented Jul 8, 2024

Copy link
Copy Markdown
Contributor

@cbodley It looks like you have changed the milestone on this PR, was that intended?

@idryomov

idryomov commented Jul 8, 2024

Copy link
Copy Markdown
Contributor

@cbodley It looks like you have changed the milestone on this PR, was that intended?

Undoing based on #57764 (comment)

@idryomov idryomov modified the milestones: quincy, v17.2.8 Jul 8, 2024
@yuriw
yuriw merged commit 13de206 into ceph:quincy Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants