Project

General

Profile

Actions

Bug #63607

open

get_pool_is_selfmanaged_snaps_mode() API is broken by design

Added by Ilya Dryomov 6 months ago. Updated 4 months ago.

Status:
Pending Backport
Priority:
Normal
Assignee:
Category:
librados
Target version:
-
% Done:

0%

Source:
Tags:
backport_processed
Backport:
pacific,quincy,reef
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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


Related issues 3 (0 open3 closed)

Copied to Ceph - Backport #63898: pacific: get_pool_is_selfmanaged_snaps_mode() API is broken by designResolvedIlya DryomovActions
Copied to Ceph - Backport #63899: quincy: get_pool_is_selfmanaged_snaps_mode() API is broken by designResolvedIlya DryomovActions
Copied to Ceph - Backport #63900: reef: get_pool_is_selfmanaged_snaps_mode() API is broken by designResolvedIlya DryomovActions
Actions #1

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.

Actions #2

Updated by Ilya Dryomov 5 months ago

  • Status changed from In Progress to Fix Under Review
  • Pull request ID set to 54644
Actions #3

Updated by Ilya Dryomov 4 months ago

  • Status changed from Fix Under Review to Pending Backport
Actions #4

Updated by Backport Bot 4 months ago

  • Copied to Backport #63898: pacific: get_pool_is_selfmanaged_snaps_mode() API is broken by design added
Actions #5

Updated by Backport Bot 4 months ago

  • Copied to Backport #63899: quincy: get_pool_is_selfmanaged_snaps_mode() API is broken by design added
Actions #6

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 #7

Updated by Backport Bot 4 months ago

  • Tags set to backport_processed
Actions

Also available in: Atom PDF