]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MonCap: simplify client.bootstrap-osd
authorSage Weil <sage@redhat.com>
Thu, 1 Jun 2017 19:52:55 +0000 (15:52 -0400)
committerLoic Dachary <ldachary@redhat.com>
Fri, 14 Jul 2017 17:47:00 +0000 (19:47 +0200)
Now it can only do 2 things:

 - mon getmap
 - osd new

\o/

Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/MonCap.cc

index af98eb2d863aeb81bc8d5a7401a74a6d71c43889..0bfc83d170eafbaecf5a141ad0f77c793a9c281d 100644 (file)
@@ -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