From: Sage Weil Date: Thu, 1 Jun 2017 19:52:55 +0000 (-0400) Subject: mon/MonCap: simplify client.bootstrap-osd X-Git-Tag: ses5-milestone9~1^2~6^2~16 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bfc1ccb390429818b129cc83897bbdf1edd2439c;p=ceph.git mon/MonCap: simplify client.bootstrap-osd Now it can only do 2 things: - mon getmap - osd new \o/ Signed-off-by: Sage Weil --- diff --git a/src/mon/MonCap.cc b/src/mon/MonCap.cc index af98eb2d863a..0bfc83d170ea 100644 --- a/src/mon/MonCap.cc +++ b/src/mon/MonCap.cc @@ -196,19 +196,10 @@ void MonCapGrant::expand_profile_mon(const EntityName& name) const } if (profile == "bootstrap-osd") { string prefix = "dm-crypt/osd"; - profile_grants.push_back(MonCapGrant("config-key put", "key", StringConstraint("", prefix))); profile_grants.push_back(MonCapGrant("mon", MON_CAP_R)); // read monmap profile_grants.push_back(MonCapGrant("osd", MON_CAP_R)); // read osdmap profile_grants.push_back(MonCapGrant("mon getmap")); - profile_grants.push_back(MonCapGrant("osd create")); - profile_grants.push_back(MonCapGrant("auth get-or-create")); - profile_grants.back().command_args["entity"] = StringConstraint("", "client."); - prefix = "allow command \"config-key get\" with key=\"dm-crypt/osd/"; - profile_grants.back().command_args["caps_mon"] = StringConstraint("", prefix); - profile_grants.push_back(MonCapGrant("auth add")); - profile_grants.back().command_args["entity"] = StringConstraint("", "osd."); - profile_grants.back().command_args["caps_mon"] = StringConstraint("allow profile osd", ""); - profile_grants.back().command_args["caps_osd"] = StringConstraint("allow *", ""); + profile_grants.push_back(MonCapGrant("osd new")); } if (profile == "bootstrap-mds") { profile_grants.push_back(MonCapGrant("mon", MON_CAP_R)); // read monmap