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

pacific: librados: make querying pools for selfmanaged snaps reliable #55024

Merged
merged 4 commits into from Jan 8, 2024

Conversation

idryomov
Copy link
Contributor

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 >=16.2.15 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)
@ljflores
Copy link
Contributor

ljflores commented Jan 8, 2024

@rzarzynski rzarzynski merged commit f62d533 into ceph:pacific Jan 8, 2024
8 checks passed
@idryomov idryomov deleted the wip-63607-pacific branch January 8, 2024 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants