From 987f175fb83efc2ce582966fbffc04680dd603f5 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 13 Jun 2013 11:27:23 -0700 Subject: [PATCH] mon/MonCap: bootstrap-* need to subscribe to osdmap, monmap Signed-off-by: Sage Weil --- src/mon/MonCap.cc | 4 ++++ 1 file changed, 4 insertions(+) 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."); -- 2.47.3