From 2dc7a959509325f8da23d0baef2509174477398c Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Tue, 22 Oct 2019 09:11:34 -0400 Subject: [PATCH] mgr: added placeholder 'osd' and 'mds' profiles 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 --- src/mgr/MgrCap.cc | 12 ++++++++++++ src/test/mgr/test_mgrcap.cc | 2 ++ 2 files changed, 14 insertions(+) diff --git a/src/mgr/MgrCap.cc b/src/mgr/MgrCap.cc index 5c990a1bdf6..ef1f3943973 100644 --- a/src/mgr/MgrCap.cc +++ b/src/mgr/MgrCap.cc @@ -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) { diff --git a/src/test/mgr/test_mgrcap.cc b/src/test/mgr/test_mgrcap.cc index 3fddb69d072..90933dd7c52 100644 --- a/src/test/mgr/test_mgrcap.cc +++ b/src/test/mgr/test_mgrcap.cc @@ -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", -- 2.39.5