Actions
Bug #63607
openget_pool_is_selfmanaged_snaps_mode() API is broken by design
% Done:
0%
Source:
Tags:
backport_processed
Backport:
pacific,quincy,reef
Regression:
No
Severity:
3 - minor
Reviewed:
Description
"rados cppool srcpool dstpool" command where srcpool is in selfmanaged snaps mode should require --yes-i-really-mean-it:
WARNING: pool srcpool has selfmanaged snaps, which are not preserved by the cppool operation. This will break any snapshot user. If you insist on making a broken copy, you can pass --yes-i-really-mean-it to proceed anyway.This precaution was added in https://github.com/ceph/ceph/pull/9187, but unfortunately it never worked because get_pool_is_selfmanaged_snaps_mode() ends up being invoked on a fresh RADOS client instance that still lacks an osdmap. Unlike other pool-related APIs such as pool_list(), get_pool_is_selfmanaged_snaps_mode() doesn't wait for an osdmap to arrive. Instead, it immediately looks up the pool by name, gets ENOENT (since the client isn't aware of any pools yet) and returns false for "this pool is not in selfmanaged snaps mode" (since the signature doesn't allow returning an error).
/// check if pool has selfmanaged snaps bool get_pool_is_selfmanaged_snaps_mode(const std::string& poolname);
Updated by Ilya Dryomov 5 months ago
This precaution was added in https://github.com/ceph/ceph/pull/9187, but unfortunately it never worked because get_pool_is_selfmanaged_snaps_mode() ends up being invoked on a fresh RADOS client instance that still lacks an osdmap.
It looks like the "never worked" part isn't true, evidenced by https://tracker.ceph.com/issues/16202. It certainly hasn't worked in years though.
Updated by Ilya Dryomov 5 months ago
- Status changed from In Progress to Fix Under Review
- Pull request ID set to 54644
Updated by Ilya Dryomov 4 months ago
- Status changed from Fix Under Review to Pending Backport
Updated by Backport Bot 4 months ago
- Copied to Backport #63898: pacific: get_pool_is_selfmanaged_snaps_mode() API is broken by design added
Updated by Backport Bot 4 months ago
- Copied to Backport #63899: quincy: get_pool_is_selfmanaged_snaps_mode() API is broken by design added
Updated by Backport Bot 4 months ago
- Copied to Backport #63900: reef: get_pool_is_selfmanaged_snaps_mode() API is broken by design added
Actions