]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: added placeholder 'osd' and 'mds' profiles
authorJason Dillaman <dillaman@redhat.com>
Tue, 22 Oct 2019 13:11:34 +0000 (09:11 -0400)
committerJason Dillaman <dillaman@redhat.com>
Thu, 9 Jan 2020 18:59:36 +0000 (13:59 -0500)
CephFS documents a previously unhandled profile named 'mds' that
needs to be accepted as valid (but currently provides no caps).
Similarly, the 'osd' cap is deployed in several scenarios as well.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 2dc7a959509325f8da23d0baef2509174477398c)

src/mgr/MgrCap.cc
src/test/mgr/test_mgrcap.cc

index 5c990a1bdf611a04d2badfdd6fe1cbc08c127185..ef1f39439735801dcbae2349394209c295baba58 100644 (file)
@@ -155,6 +155,18 @@ void MgrCapGrant::expand_profile(std::ostream *err) const {
     return;
   }
 
+  if (profile == "osd") {
+    // this is a documented profile (so we need to accept it as valid), but it
+    // currently doesn't do anything
+    return;
+  }
+
+  if (profile == "mds") {
+    // this is a documented profile (so we need to accept it as valid), but it
+    // currently doesn't do anything
+    return;
+  }
+
   if (profile == "rbd" || profile == "rbd-read-only") {
     Arguments filtered_arguments;
     for (auto& [key, constraint] : arguments) {
index 3fddb69d0728d3ff97b5abed42f0683e93ac30e7..90933dd7c5292302906eeabbfb95f028ed626881 100644 (file)
@@ -64,6 +64,8 @@ const char *parse_good[] = {
   "allow command \"foo bar\" with arg=\"baz.xx\"",
   "allow command \"foo bar\" with arg = \"baz.xx\"",
   "profile crash",
+  "profile osd",
+  "profile mds",
   "profile rbd pool=ABC namespace=NS",
   "profile \"rbd-read-only\", profile crash",
   "allow * network 1.2.3.4/24",