Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reef: librados: make querying pools for selfmanaged snaps reliable #55026

Merged
merged 4 commits into from
Feb 15, 2024

Conversation

idryomov
Copy link
Contributor

@idryomov idryomov added this to the reef milestone Dec 29, 2023
@idryomov idryomov requested a review from ajarr December 29, 2023 12:06
@idryomov idryomov requested a review from a team as a code owner December 29, 2023 12:06
@idryomov idryomov modified the milestones: reef, v18.2.2 Feb 2, 2024
Copy link

github-actions bot commented Feb 6, 2024

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@amathuria
Copy link
Contributor

Copy link

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

Refer to the commit message of 8a9769a ("librados: add
get_pool_is_selfmanaged_snaps_mode() function").

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 54edc79)
If get_pool_is_selfmanaged_snaps_mode() is invoked on a fresh RADOS
client instance that still lacks an osdmap, it returns false, same as
for "this pool is not in selfmanaged snaps mode".  The same happens if
the pool in question doesn't exist since the signature doesn't allow to
return an error.

The motivation for this API was to prevent users from running "rados
cppool" on a pool with unmanaged snapshots and deleting the original
thinking that they have a full copy.  Unfortunately, it's exactly
"rados cppool" that fell into this trap, so no warning is printed and
--yes-i-really-mean-it flag isn't enforced.

Fixes: https://tracker.ceph.com/issues/63607
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 0999e63)

Conflicts:
	PendingReleaseNotes [ moved to >=18.2.2 section ]
Safeguards in rados CLI tool isn't really the subject of this test, but
it fits nicely.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 2b135a2)
Otherwise an occasional segfault occurs.  This instance was missed in
commit 2c14926 ("tools/rados: always call rados.shutdown() before
exit()").

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit de66355)
@idryomov
Copy link
Contributor Author

Rebased to resolve a conflict in PendingReleaseNotes.

@idryomov
Copy link
Contributor Author

jenkins test make check


/// check if pool has or had selfmanaged snaps
bool get_pool_is_selfmanaged_snaps_mode(const std::string& poolname)
__attribute__ ((deprecated));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume it's fine to deprecate in a minor release.

@yuriw yuriw merged commit b2f91f1 into ceph:reef Feb 15, 2024
10 checks passed
@idryomov idryomov deleted the wip-63607-reef branch February 15, 2024 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants