From: Jason Dillaman Date: Tue, 22 Oct 2019 13:11:34 +0000 (-0400) Subject: mgr: added placeholder 'osd' and 'mds' profiles X-Git-Tag: v14.2.8~20^2~55^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d90465ec740425bc1b4b632d98d4e586d76c40b8;p=ceph.git 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 (cherry picked from commit 2dc7a959509325f8da23d0baef2509174477398c) --- 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",