Skip to content

Commit

Permalink
mon/MonCap: simplify client.bootstrap-osd
Browse files Browse the repository at this point in the history
Now it can only do 2 things:

 - mon getmap
 - osd new

\o/

Signed-off-by: Sage Weil <sage@redhat.com>
  • Loading branch information
liewegas authored and ldachary committed Jun 5, 2017
1 parent ae8e959 commit f4ca9db
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/mon/MonCap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f4ca9db

Please sign in to comment.