]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd/OSDCap: allow rbd.metadata_list method under rbd-read-only profile 51814/head
authorIlya Dryomov <idryomov@gmail.com>
Sat, 27 May 2023 10:28:40 +0000 (12:28 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 29 May 2023 12:56:44 +0000 (14:56 +0200)
commitb580cdad8d42b4e54fd9e4ef9def13d091f719e9
treee2822d829fc9147d10af39f4c299d5102241775e
parentc50902cb5ebbeb593b37c5fc2c792cad7b8a78e9
osd/OSDCap: allow rbd.metadata_list method under rbd-read-only profile

This was missed in commit acc447d5de7b ("osd/OSDCap: rbd profile
permits use of rbd.metadata_list cls method") which adjusted only
"profile rbd" OSD cap.  Listing image metadata is an essential part
of opening the image and "profile rbd-read-only" OSD cap must allow
it too.

While at it, constrain the existing grant for rbd profile from "any
object in the pool" to just "rbd_info object in the global namespace of
the pool" as this is where pool-level image metadata actually lives.

Fixes: https://tracker.ceph.com/issues/61382
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/osd/OSDCap.cc
src/test/osd/osdcap.cc