Skip to content

rbd: add group snap info command - #57797

Merged
idryomov merged 1 commit into
ceph:mainfrom
ajarr:wip-66011
Jul 23, 2024
Merged

idryomov merged 1 commit into
ceph:mainfrom
ajarr:wip-66011

Conversation

@ajarr

@ajarr ajarr commented May 30, 2024 •

Copy link
Copy Markdown
Contributor

See #57797 (comment) for example outputs

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

@ajarr ajarr added the rbd label May 30, 2024
@ajarr
ajarr requested a review from a team as a code owner May 30, 2024 22:07
@ajarr
ajarr marked this pull request as draft May 30, 2024 22:08
@ajarr

ajarr commented May 30, 2024

Copy link
Copy Markdown
Contributor Author

TODOs:

  • Tests
  • Add C API and python bindings for group_snap_info
  • tackle any backward compatibility issue with adding id in rbd_group_snap_info_t structure

@ajarr

ajarr commented May 30, 2024

Copy link
Copy Markdown
Contributor Author

Request for feedback on the current rbd group snap info command output. See #57797 (comment)

I think we should also show some info about the .group snapshots in the group snap info output. This way the user can quickly fetch the details of a .group snapshot to perform an operation, e.g. cloning a .group snapshot.

Option 1:

$ rbd group snap info data/gp@snap1
rbd group snapshot 'snap1':
	id: 104edb3201c6
	state: ok
	image snapshots:
		 data/[email protected]_10407fbbaf15_104edb3201c6 (snapid: 4)
		 data/[email protected]_10407fbbaf15_104edb3201c6 (snapid: 3)
                 data/[email protected]_10407fbbaf15_104edb3201c6 (snapid: 5)

Option 2 that includes a table:

$ rbd group snap info data/gp@snap1
rbd group snapshot 'snap1':
	id: 104edb3201c6
	state: ok
	image snapshots:
	        IMAGESPEC   SNAPID               SNAPNAME
		 data/img1       4           group.3_10407fbbaf15_104edb3201c6
		 data/img2       3           group.3_10407fbbaf15_104edb3201c6
                 data/img3       5           group.3_10407fbbaf15_104edb3201c6

@idryomov

idryomov commented Jun 3, 2024

Copy link
Copy Markdown
Contributor

I think we should also show some info about the .group snapshots in the group snap info output. This way the user can quickly fetch the details of a .group snapshot to perform an operation, e.g. cloning a .group snapshot.

Agreed. I like option 1 better and would propose the following enhancement, recognizing that .group snapshots for a particular group snapshot are going to have the same name across all images:

$ rbd group snap info data/gp@snap1
rbd group snapshot 'snap1':
	id: 104edb3201c6
	state: ok
        image snap: .group.3_10407fbbaf15_104edb3201c6
	images:
		 data/img1 (snapid: 4)
		 data/img2 (snapid: 3)
                 data/img3 (snapid: 5)

@sunilangadi2

Copy link
Copy Markdown

I think we should also show some info about the .group snapshots in the group snap info output. This way the user can quickly fetch the details of a .group snapshot to perform an operation, e.g. cloning a .group snapshot.

Agreed. I like option 1 better and would propose the following enhancement, recognizing that .group snapshots for a particular group snapshot are going to have the same name across all images:

$ rbd group snap info data/gp@snap1
rbd group snapshot 'snap1':
	id: 104edb3201c6
	state: ok
        image snap: .group.3_10407fbbaf15_104edb3201c6
	images:
		 data/img1 (snapid: 4)
		 data/img2 (snapid: 3)
                 data/img3 (snapid: 5)

Just thought in terms of metrics perspective as well in future if we need these information in the form of metrics
keeping image snapshots with IMAGESPEC SNAPID header would be useful.

@sunilangadi2
sunilangadi2 self-requested a review June 3, 2024 13:52
@idryomov

idryomov commented Jun 3, 2024 •

Copy link
Copy Markdown
Contributor

Just thought in terms of metrics perspective as well in future if we need these information in the form of metrics
keeping image snapshots with IMAGESPEC SNAPID header would be useful.

@sunilangadi2 By "in the form of metrics", are you referring to parsing the output in scripts? If so, formatted output (e.g. --format json) should be used for that.

@idryomov

idryomov commented Jun 3, 2024

Copy link
Copy Markdown
Contributor

I like option 1 better and would propose the following enhancement

@ajarr I'd probably also add a space between snap and id:

	images:
		 data/img1 (snap id: 4)

I know that the respective column in rbd snap ls output is named SNAPID, but I don't think that is reason enough to propagate this spelling, especially given that those RBD commands that accept the snap ID do it via --snap-id option, not --snapid.

Comment thread src/include/rbd/librbd.h Resolved
Comment thread src/tracing/librbd.tp Resolved
Comment thread src/tools/rbd/action/Group.cc Resolved
Comment thread src/librbd/librbd.cc Resolved
Comment thread src/librbd/api/Group.cc Resolved
Comment thread src/librbd/api/Group.cc Resolved
Comment thread src/librbd/api/Group.cc Resolved
@ajarr

ajarr commented Jun 11, 2024

Copy link
Copy Markdown
Contributor Author

group snap info outputs:

CLI

 $ rbd group snap info data/gp@snap1
rbd group snapshot 'snap1':
	id: 104ccb3288f3
	state: ok
	image snap: .group.3_103e77dd2be9_104ccb3288f3
	images:
		data/img1 (snap id: 3)
		data/img2 (snap id: 4)
		data/img3 (snap id: 5)

CLI -- formated JSON

$ ./bin/rbd group snap info data/gp@snap1 --format=json
{"id":"104ccb3288f3","name":"snap1","state":"ok","images":[{"pool_name":"data","namespace":"","image_name":"img1","snap_name":".group.3_103e77dd2be9_104ccb3288f3","snap_id":3},{"pool_name":"data","namespace":"","image_name":"img2","snap_name":".group.3_103e77dd2be9_104ccb3288f3","snap_id":4},{"pool_name":"data","namespace":"","image_name":"img3","snap_name":".group.3_103e77dd2be9_104ccb3288f3","snap_id":5}]}

Python

>>> import rados; import rbd; rc = rados.Rados(conffile='/home/rraja/git/ceph-3/build/ceph.conf'); rc.connect(); ioctx = rc.open_ioctx('data'); gc = rbd.Group(ioctx, 'gp')
>>> print(gc.show_snap('snap1'))
{'id': '104ccb3288f3', 'name': 'snap1', 'state': 1, 'images': [{'pool_id': 3, 'namespace': '', 'image_name': 'img1', 'snap_name': '.group.3_103e77dd2be9_104ccb3288f3', 'snap_id': 3}, {'pool_id': 3, 'namespace': '', 'image_name': 'img2', 'snap_name': '.group.3_103e77dd2be9_104ccb3288f3', 'snap_id': 4}, {'pool_id': 3, 'namespace': '', 'image_name': 'img3', 'snap_name': '.group.3_103e77dd2be9_104ccb3288f3', 'snap_id': 5}]}
>>> ioctx.close(); rc.shutdown()

Comment thread src/librbd/librbd.cc Resolved
Comment thread src/librbd/api/Group.cc Resolved
@idryomov

Copy link
Copy Markdown
Contributor

CLI -- formated JSON

Paste the output with --pretty-format or piped through jq next time ;)

{
  "id": "104ccb3288f3",
  "name": "snap1",
  "state": "ok",
  "images": [
    {
      "pool_name": "data",
      "namespace": "",
      "image_name": "img1",
      "snap_name": ".group.3_103e77dd2be9_104ccb3288f3",
      "snap_id": 3
    },
    {
      "pool_name": "data",
      "namespace": "",
      "image_name": "img2",
      "snap_name": ".group.3_103e77dd2be9_104ccb3288f3",
      "snap_id": 4
    },
    {
      "pool_name": "data",
      "namespace": "",
      "image_name": "img3",
      "snap_name": ".group.3_103e77dd2be9_104ccb3288f3",
      "snap_id": 5
    }
  ]
}

I see two issues:

  • namespace key on images is redundant. I'd drop it as all images are guaranteed to be in the same namespace as the group.
  • snap_name key on images is redundant. I'd extend what was done for human-readable output to formatted output -- replace per-image snap_name keys with a single image_snap_name key at the top level.

@idryomov

Copy link
Copy Markdown
Contributor

Python

{
    'id': '104ccb3288f3',
    'name': 'snap1',
    'state': 1,
    'images': [
        {
            'pool_id': 3,
            'namespace': '',
            'image_name': 'img1',
            'snap_name': '.group.3_103e77dd2be9_104ccb3288f3',
            'snap_id': 3
        },
        {
            'pool_id': 3,
            'namespace': '',
            'image_name': 'img2',
            'snap_name': '.group.3_103e77dd2be9_104ccb3288f3',
            'snap_id': 4
        },
        {
            'pool_id': 3,
            'namespace': '',
            'image_name': 'img3',
            'snap_name': '.group.3_103e77dd2be9_104ccb3288f3',
            'snap_id': 5
        }
    ]
}

Same comments as on the formated CLI output.

@idryomov

Copy link
Copy Markdown
Contributor

Can you also paste rbd group snap ls output -- it includes the snap ID now, right?

@ajarr

ajarr commented Jun 12, 2024 •

Copy link
Copy Markdown
Contributor Author

Can you also paste rbd group snap ls output -- it includes the snap ID now, right?

Yes

$ ./bin/rbd group snap ls data/gp
ID            NAME   STATUS
10549dbdd25   snap1      ok
105617e77e71  snap2      ok
10581057509a  snap3      ok



$ ./bin/rbd group snap ls data/gp --format json --pretty-format
[
    {
        "id": "10549dbdd25",
        "snapshot": "snap1",
        "state": "ok"
    },
    {
        "id": "105617e77e71",
        "snapshot": "snap2",
        "state": "ok"
    },
    {
        "id": "10581057509a",
        "snapshot": "snap3",
        "state": "ok"
    }
]

Comment thread src/include/rbd/librbd.h Resolved
Comment thread src/include/rbd/librbd.h Resolved
Comment thread src/include/rbd/librbd.h Resolved
Comment thread src/include/rbd/librbd.h Resolved
Comment thread src/librbd/api/Group.cc Resolved
@sunilangadi2

Copy link
Copy Markdown

@ajarr Is it expected to have "snap_name": ".group.3_103e77dd2be9_104ccb3288f3" starting with .?

@ajarr
ajarr force-pushed the wip-66011 branch 2 times, most recently from bd1ffef to 2bdcfe0 Compare June 18, 2024 23:05
@ajarr

ajarr commented Jun 19, 2024 •

Copy link
Copy Markdown
Contributor Author
$ ceph osd pool create data
$ rbd pool init data
$ rbd group create data/gp
$ for ((i=1; i<=3 ; i=i+1)); do `rbd create -s 1M data/img$i`; done
$ for ((i=1; i<=3 ; i=i+1)); do `rbd group image add data/gp data/img$i`; done
$ for ((i=1; i<=3 ; i=i+1)); do `rbd group snap create data/gp@snap$i`; done

Fetching information about a group snapshot using CLI

$ rbd group snap info data/gp@snap1
rbd group snapshot 'snap1':
	id: 104e6d3699e
	state: ok
	image snap: .group.3_103a6510642_104e6d3699e
	images:
		data/img1 (snap id: 3)
		data/img2 (snap id: 4)
		data/img3 (snap id: 5)

$ rbd group snap info data/gp@snap1 --format=json --pretty-format
{
    "id": "104e6d3699e",
    "name": "snap1",
    "image_snap_name": ".group.3_103a6510642_104e6d3699e",
    "state": "ok",
    "images": [
        {
            "pool_name": "data",
            "image_name": "img1",
            "snap_id": 3
        },
        {
            "pool_name": "data",
            "image_name": "img2",
            "snap_id": 4
        },
        {
            "pool_name": "data",
            "image_name": "img3",
            "snap_id": 5
        }
    ]
}

Fetching information about a group snapshot using python API

>>> import rados; import rbd; rc = rados.Rados(conffile='/home/rraja/git/ceph-3/build/ceph.conf'); rc.connect(); ioctx = rc.open_ioctx('data'); gc = rbd.Group(ioctx, 'gp')
>>> print(json.dumps(gc.get_snap_info('snap1'), indent=2))
{
  "id": "104e6d3699e",
  "name": "snap1",
  "state": 1,
  "image_snap_name": ".group.3_103a6510642_104e6d3699e",
  "images": [
    {
      "pool_id": 3,
      "snap_id": 3,
      "image_name": "img1"
    },
    {
      "pool_id": 3,
      "snap_id": 4,
      "image_name": "img2"
    },
    {
      "pool_id": 3,
      "snap_id": 5,
      "image_name": "img3"
    }
  ]
}

Listing group snapshots using CLI

$ rbd group snap ls data/gp
ID            NAME   STATUS
104e6d3699e   snap1      ok
1050aa0ea3dc  snap2      ok
1052641a00bb  snap3      ok
$ rbd group snap ls data/gp --format=json --pretty-format
[
    {
        "id": "104e6d3699e",
        "snapshot": "snap1",
        "state": "ok"
    },
    {
        "id": "1050aa0ea3dc",
        "snapshot": "snap2",
        "state": "ok"
    },
    {
        "id": "1052641a00bb",
        "snapshot": "snap3",
        "state": "ok"
    }
]

Listing group snapshots using Python interface

>>> for i in gc.list_snaps():
...     print(json.dumps((i), indent=2))
... 
{
  "id": "104e6d3699e",
  "name": "snap1",
  "state": 1,
  "image_snap_name": ".group.3_103a6510642_104e6d3699e",
  "images": [
    {
      "pool_id": 3,
      "snap_id": 3,
      "image_name": "img1"
    },
    {
      "pool_id": 3,
      "snap_id": 4,
      "image_name": "img2"
    },
    {
      "pool_id": 3,
      "snap_id": 5,
      "image_name": "img3"
    }
  ]
}
{
  "id": "1050aa0ea3dc",
  "name": "snap2",
  "state": 1,
  "image_snap_name": ".group.3_103a6510642_1050aa0ea3dc",
  "images": [
    {
      "pool_id": 3,
      "snap_id": 6,
      "image_name": "img1"
    },
    {
      "pool_id": 3,
      "snap_id": 7,
      "image_name": "img2"
    },
    {
      "pool_id": 3,
      "snap_id": 8,
      "image_name": "img3"
    }
  ]
}
{
  "id": "1052641a00bb",
  "name": "snap3",
  "state": 1,
  "image_snap_name": ".group.3_103a6510642_1052641a00bb",
  "images": [
    {
      "pool_id": 3,
      "snap_id": 9,
      "image_name": "img1"
    },
    {
      "pool_id": 3,
      "snap_id": 10,
      "image_name": "img2"
    },
    {
      "pool_id": 3,
      "snap_id": 11,
      "image_name": "img3"
    }
  ]

@ajarr

ajarr commented Jun 19, 2024 •

Copy link
Copy Markdown
Contributor Author

@ajarr Is it expected to have "snap_name": ".group.3_103e77dd2be9_104ccb3288f3" starting with .?

@sunilangadi2 please see #57797 (comment)

Yes, the snapshots of images that constitute a group snapshot have names starting with .group. We (developers) refer to them as dotgroup snapshots.

Comment thread src/tools/rbd/action/Group.cc Resolved
@ajarr
ajarr requested a review from idryomov July 17, 2024 21:58
Comment thread src/tools/rbd/action/Group.cc Resolved
Comment thread src/tools/rbd/action/Group.cc Resolved
@ajarr

ajarr commented Jul 18, 2024

Copy link
Copy Markdown
Contributor Author

@idryomov as you mentioned earlier, previous implementation of group snap ls command that displayed just the snap name and state would work when the pool of a group's image is removed from underneath. The new implementation of group snap ls introduced in this PR will fail in such a scenario (See https://tracker.ceph.com/issues/67021). I guess we'll fix this properly when working on https://tracker.ceph.com/issues/67021 ?

@idryomov

Copy link
Copy Markdown
Contributor

No related failures:

https://pulpito.ceph.com/dis-2024-07-18_22:11:30-rbd-wip-dis-testing-distro-default-smithi/
https://pulpito.ceph.com/dis-2024-07-19_12:06:54-rbd-wip-dis-testing-distro-default-smithi/
https://pulpito.ceph.com/dis-2024-07-19_20:40:00-rbd-wip-dis-testing-distro-default-smithi/

(Jobs where TestLibRBD.TestEncryptionLUKS1 triggers an assert

2024-07-19T12:48:08.399 INFO:tasks.ceph.osd.3.smithi110.stderr:/home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos9/DIST/centos9/MACHINE_SIZE/gigantic/release/19.0.0-5126-g01e1aa05/rpm/el9/BUILD/ceph-19.0.0-5126-g01e1aa05/src/osd/ECCommon.cc: In function 'static void ECCommon::ReadPipeline::get_min_want_to_read_shards(uint64_t, uint64_t, const ECUtil::stripe_info_t&, const std::vector<int>&, std::set<int>*)' thread 7f9b60945640 time 2024-07-19T12:48:08.398035+0000
2024-07-19T12:48:08.399 INFO:tasks.ceph.osd.3.smithi110.stderr:/home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos9/DIST/centos9/MACHINE_SIZE/gigantic/release/19.0.0-5126-g01e1aa05/rpm/el9/BUILD/ceph-19.0.0-5126-g01e1aa05/src/osd/ECCommon.cc: 336: FAILED ceph_assert(want_to_read->size() == sinfo.get_data_chunk_count())
2024-07-19T12:48:08.401 INFO:tasks.ceph.osd.3.smithi110.stderr: ceph version 19.0.0-5126-g01e1aa05 (01e1aa052c15e2a077a20de402d3ae763de4a30d) squid (dev)
2024-07-19T12:48:08.401 INFO:tasks.ceph.osd.3.smithi110.stderr: 1: (ceph::__ceph_assert_fail(char const*, char const*, int, char const*)+0x11e) [0x56123c9a347e]
2024-07-19T12:48:08.401 INFO:tasks.ceph.osd.3.smithi110.stderr: 2: ceph-osd(+0x3fd63a) [0x56123c9a363a]
2024-07-19T12:48:08.401 INFO:tasks.ceph.osd.3.smithi110.stderr: 3: ceph-osd(+0x3a4a88) [0x56123c94aa88]
2024-07-19T12:48:08.401 INFO:tasks.ceph.osd.3.smithi110.stderr: 4: (ECCommon::ReadPipeline::get_min_want_to_read_shards(unsigned long, unsigned long, std::set<int, std::less<int>, std::allocator<int> >*)+0x56) [0x56123cc9b886]
2024-07-19T12:48:08.401 INFO:tasks.ceph.osd.3.smithi110.stderr: 5: (ECCommon::ReadPipeline::objects_read_and_reconstruct(std::map<hobject_t, std::__cxx11::list<ECCommon::ec_align_t, std::allocator<ECCommon::ec_align_t> >, std::less<hobject_t>, std::allocator<std::pair<hobject_t const, std::__cxx11::list<ECCommon::ec_align_t, std::allocator<ECCommon::ec_align_t> > > > > const&, bool, std::unique_ptr<GenContext<std::map<hobject_t, ECCommon::ec_extent_t, std::less<hobject_t>, std::allocator<std::pair<hobject_t const, ECCommon::ec_extent_t> > >&&>, std::default_delete<GenContext<std::map<hobject_t, ECCommon::ec_extent_t, std::less<hobject_t>, std::allocator<std::pair<hobject_t const, ECCommon::ec_extent_t> > >&&> > >&&)+0x8f7) [0x56123cca48a7]
2024-07-19T12:48:08.401 INFO:tasks.ceph.osd.3.smithi110.stderr: 6: (ECBackend::objects_read_async(hobject_t const&, std::__cxx11::list<std::pair<ECCommon::ec_align_t, std::pair<ceph::buffer::v15_2_0::list*, Context*> >, std::allocator<std::pair<ECCommon::ec_align_t, std::pair<ceph::buffer::v15_2_0::list*, Context*> > > > const&, Context*, bool)+0x5a0) [0x56123ceb8240]
2024-07-19T12:48:08.401 INFO:tasks.ceph.osd.3.smithi110.stderr: 7: (PrimaryLogPG::OpContext::start_async_reads(PrimaryLogPG*)+0x179) [0x56123cbda069]
2024-07-19T12:48:08.401 INFO:tasks.ceph.osd.3.smithi110.stderr: 8: (PrimaryLogPG::execute_ctx(PrimaryLogPG::OpContext*)+0x474) [0x56123cc0adc4]
2024-07-19T12:48:08.402 INFO:tasks.ceph.osd.3.smithi110.stderr: 9: (PrimaryLogPG::do_op(boost::intrusive_ptr<OpRequest>&)+0x342b) [0x56123cc036ab]
2024-07-19T12:48:08.402 INFO:tasks.ceph.osd.3.smithi110.stderr: 10: (OSD::dequeue_op(boost::intrusive_ptr<PG>, boost::intrusive_ptr<OpRequest>, ThreadPool::TPHandle&)+0x197) [0x56123cb41697]
2024-07-19T12:48:08.402 INFO:tasks.ceph.osd.3.smithi110.stderr: 11: (ceph::osd::scheduler::PGOpItem::run(OSD*, OSDShard*, boost::intrusive_ptr<PG>&, ThreadPool::TPHandle&)+0x69) [0x56123cd864d9]
2024-07-19T12:48:08.402 INFO:tasks.ceph.osd.3.smithi110.stderr: 12: (OSD::ShardedOpWQ::_process(unsigned int, ceph::heartbeat_handle_d*)+0xd07) [0x56123cb5ade7]
2024-07-19T12:48:08.402 INFO:tasks.ceph.osd.3.smithi110.stderr: 13: (ShardedThreadPool::shardedthreadpool_worker(unsigned int)+0x2aa) [0x56123d05ef6a]
2024-07-19T12:48:08.402 INFO:tasks.ceph.osd.3.smithi110.stderr: 14: ceph-osd(+0xab9514) [0x56123d05f514]
2024-07-19T12:48:08.402 INFO:tasks.ceph.osd.3.smithi110.stderr: 15: /lib64/libc.so.6(+0x89c02) [0x7f9b83a89c02]
2024-07-19T12:48:08.402 INFO:tasks.ceph.osd.3.smithi110.stderr: 16: /lib64/libc.so.6(+0x10ec40) [0x7f9b83b0ec40]
2024-07-19T12:48:08.402 INFO:tasks.ceph.osd.3.smithi110.stderr:*** Caught signal (Aborted) **

in the OSD were excluded from last the rerun. This issue is being looked at by the RADOS team.)

@idryomov

Copy link
Copy Markdown
Contributor

jenkins test api

@idryomov

idryomov commented Jul 20, 2024 •

Copy link
Copy Markdown
Contributor

@idryomov as you mentioned earlier, previous implementation of group snap ls command that displayed just the snap name and state would work when the pool of a group's image is removed from underneath. The new implementation of group snap ls introduced in this PR will fail in such a scenario (See https://tracker.ceph.com/issues/67021).

I don't think the fact that this PR makes the situation worse for rbd group snap ls command is a blocker. As noted in the tracker, many other commands break when a pool is removed underneath a group and cleaning that up using just rbd CLI is impossible today. To recover, one would need to reach into and manipulate the group metadata using rados CLI and they would be able to see the snapshots there.

I guess we'll fix this properly when working on https://tracker.ceph.com/issues/67021 ?

Yes, when someone gets to it.

Comment thread qa/workunits/rbd/rbd_groups.sh Resolved
Comment thread qa/workunits/rbd/rbd_groups.sh Resolved
Comment thread qa/workunits/rbd/rbd_groups.sh Resolved
Comment thread qa/workunits/rbd/rbd_groups.sh Resolved
Comment thread src/test/librbd/test_Groups.cc Resolved
Comment thread src/test/librbd/test_Groups.cc Resolved
Comment thread src/test/librbd/test_Groups.cc Resolved
... to show information about a group snapshot.

And also include group snap ID in `group snap ls` output.

Fixes: https://tracker.ceph.com/issues/66011
Signed-off-by: Ramana Raja <[email protected]>
@ajarr
ajarr requested a review from idryomov July 22, 2024 16:49
@idryomov

Copy link
Copy Markdown
Contributor

jenkins test api

@idryomov
idryomov merged commit ed30494 into ceph:main Jul 23, 2024
@ajarr
ajarr deleted the wip-66011 branch July 23, 2024 20:20
@Matan-B

Matan-B commented Jul 24, 2024

Copy link
Copy Markdown
Contributor

Hey,
friendly request here to disable new tests on crimson or pinging once test_rbd.py changes if possible.
It breaks Crimson suite once an unsupported test is added.
Thank you!
@idryomov

@idryomov

Copy link
Copy Markdown
Contributor

Hey, friendly request here to disable new tests on crimson or pinging once test_rbd.py changes if possible.

@Matan-B I'm not following how something related to this PR could be not supported by Crimson. We simply exposed a few additional fields through the API here.

It breaks Crimson suite once an unsupported test is added.

I think the issue with https://pulpito.ceph.com/matan-2024-07-24_07:30:51-crimson-rados-wip-sjust-crimson-testing-2024-07-22-distro-crimson-smithi/ is the mismatch between the branch that was built and the branch that was used to get the test definitions.

@Matan-B

Matan-B commented Jul 24, 2024

Copy link
Copy Markdown
Contributor

@Matan-B I'm not following how something related to this PR could be not supported by Crimson. We simply exposed a few additional fields through the API here.

I think the issue with https://pulpito.ceph.com/matan-2024-07-24_07:30:51-crimson-rados-wip-sjust-crimson-testing-2024-07-22-distro-crimson-smithi/ is the mismatch between the branch that was built and the branch that was used to get the test definitions.

Ah, this is possible since test_rbd.py was pulled from main and the build's sha1 is older than that.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants