Project

General

Profile

Actions

Bug #67021

open
RR

group CLI commands fail/behave unexpectedly when the pool of a group's image is removed

Bug #67021: group CLI commands fail/behave unexpectedly when the pool of a group's image is removed

Added by Ramana Raja over 2 years ago. Updated over 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Merge Commit:
Fixed In:
Released In:
Upkeep Timestamp:

Description

Create a group with images belonging to different pools

$ rbd create -s 1M img1
$ rbd create -s 1M img2
$ rbd group create gp
$ rbd group image add gp img1
$ rbd group image add gp img2
$ rbd group snap create gp@snap1
$ rbd group snap create gp@snap2
$ rbd group image ls gp
rbd/img1 
rbd/img2
$ ceph osd pool create data
$ rbd create -s 1M data/img3
$ rbd group image add gp data/img3
$ rbd group image ls gp
rbd/img1 
rbd/img2 
data/img3 

Remove the pool of one of the group's image

$ ceph osd pool rm data data --yes-i-really-really-mean-it
pool 'data' removed

Group image listing displays a partial list of group's images

$ rbd group image ls gp --debug=20
2024-07-18T13:29:29.263-0400 7fbc9afc8880 20 librbd::api::Group: image_list: io_ctx=0x7fff18ab58a8 group name gp
2024-07-18T13:29:29.264-0400 7fbc9afc8880 20 librbd::api::Group: group_image_list: listing images in group name gp group id rbd_group_header.103aff0d1bcf
2024-07-18T13:29:29.265-0400 7fbc9afc8880  1 librbd::util::create_ioctx: image pool 3 no longer exists
rbd/img1 
rbd/img2
$ echo $?
0

Removing the group image belonging to the deleted pool fails

$ rbd group image rm gp data/img3 --debug_rbd=20
rbd: error opening pool 'data': (2) No such file or directory
$ echo $?
2

Creating a new group snapshot fails

$ rbd group snap create gp@snap4
$ echo $?
2

Listing group snapshots (implemented in https://github.com/ceph/ceph/pull/57797 using RBD::group_snap_list2()) fails

$ rbd group snap ls gp --debug_rbd=20
2024-07-18T14:55:21.162-0400 7f39d07ed880  1 librbd::util::create_ioctx: image pool 3 no longer exists

Can still fetch information about group snapshots that don't contain the image whose pool was deleted

$ rbd group snap info gp@snap1
rbd group snapshot 'snap1':
    id: 104a8feff421
    state: complete
    image snap: .group.1_103aff0d1bcf_104a8feff421
    images:
        rbd/img1 (snap id: 4)
        rbd/img2 (snap id: 3)

RR Updated by Ramana Raja over 2 years ago Actions #1

  • Subject changed from group CLI commands behaving unexpectedly when a pool of a group's image is removed to group CLI commands fail/behave unexpectedly when the pool of a group's image is removed

ID Updated by Ilya Dryomov over 2 years ago Actions #2

Ramana Raja wrote:

Group image listing displays a partial list of group's images
$ rbd group image ls gp --debug=20
2024-07-18T13:29:29.263-0400 7fbc9afc8880 20 librbd::api::Group: image_list: io_ctx=0x7fff18ab58a8 group name gp
2024-07-18T13:29:29.264-0400 7fbc9afc8880 20 librbd::api::Group: group_image_list: listing images in group name gp group id rbd_group_header.103aff0d1bcf
2024-07-18T13:29:29.265-0400 7fbc9afc8880 1 librbd::util::create_ioctx: image pool 3 no longer exists
rbd/img1
rbd/img2
$ echo $?
0

This output doesn't demonstrate the most obnoxious aspect of the "partial list" behavior -- the command could list just rbd/img1, just rbd/img2 or no images at all (depending on their IDs) and still exit with 0 without printing anything to stderr. "image pool 3 no longer exists" isn't logged as an error and requires at least "--debug-rbd 1" to be passed.

ID Updated by Ilya Dryomov over 2 years ago Actions #3

Also noting that similar issues ensue if a group's image is moved to the trash.

Actions

Also available in: PDF Atom