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);
Actions