From: Sage Weil Date: Thu, 13 Jun 2013 18:27:23 +0000 (-0700) Subject: mon/MonCap: bootstrap-* need to subscribe to osdmap, monmap X-Git-Tag: v0.65~84 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=987f175fb83efc2ce582966fbffc04680dd603f5;p=ceph.git mon/MonCap: bootstrap-* need to subscribe to osdmap, monmap Signed-off-by: Sage Weil --- diff --git a/src/mon/MonCap.cc b/src/mon/MonCap.cc index bf8eb6fb79df..6f1055091e00 100644 --- a/src/mon/MonCap.cc +++ b/src/mon/MonCap.cc @@ -143,6 +143,8 @@ void MonCapGrant::expand_profile(entity_name_t name) const profile_grants.push_back(MonCapGrant("config-key delete", "key", StringConstraint("", prefix))); } if (profile == "bootstrap-osd") { + 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("osd crush set")); // FIXME: constraint this further? @@ -152,6 +154,8 @@ void MonCapGrant::expand_profile(entity_name_t name) const profile_grants.back().command_args["caps_osd"] = StringConstraint("allow *", ""); } if (profile == "bootstrap-mds") { + 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("auth get-or-create")); // FIXME: this can expose other mds keys profile_grants.back().command_args["name"] = StringConstraint("", "mds.");