]> 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 51877/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:00:55 +0000 (19:00 +0200)
commit9c2b666dfab0b8446f2b99a1ad712dcf70fbd839
tree6254a9dfd174803ebc6c92e8470c533f05152584
parent850f162d779001975d92ecad3d1ae9dffcdd1eef
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