]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd/OSDCap: allow rbd.metadata_list method under rbd-read-only profile 51878/head
authorIlya Dryomov <idryomov@gmail.com>
Sat, 27 May 2023 10:28:40 +0000 (12:28 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 1 Jun 2023 17:01:16 +0000 (19:01 +0200)
commit3dbbb7e52c5e55fd5a2db0292c4e8cc3213463ed
treecf211e3f30b942b0b05d617178c6501b61870938
parent8e24bcf462a1d94c2e12aa4e26419634883a1e88
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>
(cherry picked from commit b580cdad8d42b4e54fd9e4ef9def13d091f719e9)
src/osd/OSDCap.cc
src/test/osd/osdcap.cc