]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/OSDCap: rbd profile permits use of "rbd_info" 36413/head
authorFlorian Florensa <fflorensa@online.net>
Mon, 22 Jun 2020 10:53:40 +0000 (12:53 +0200)
committerShyukri Shyukriev <shshyukriev@suse.com>
Sun, 2 Aug 2020 15:29:39 +0000 (18:29 +0300)
User restricted to a namespace needs to be able to read rbd_info in
default namespace in order to create volumes.

Fixes: https://tracker.ceph.com/issues/46139
Signed-off-by: Florian Florensa <fflorensa@online.net>
(cherry picked from commit 1e9fceabc457dd46a622710c6ec81cfe30a2656e)

src/osd/OSDCap.cc

index b6df192c31ea1c7a5acc65c92fa1e6cd1700a39d..bd8d0b892f83159674cc01896968191b043ff6c6 100644 (file)
@@ -332,6 +332,8 @@ void OSDCapGrant::expand_profile()
 
   if (profile.name == "rbd") {
     // RBD read-write grant
+    profile_grants.emplace_back(OSDCapMatch(string(), "rbd_info"),
+                                OSDCapSpec(osd_rwxa_t(OSD_CAP_R)));
     profile_grants.emplace_back(OSDCapMatch(string(), "rbd_children"),
                                 OSDCapSpec(osd_rwxa_t(OSD_CAP_CLS_R)));
     profile_grants.emplace_back(OSDCapMatch(string(), "rbd_mirroring"),