From: Venky Shankar Date: Wed, 22 Jan 2020 12:17:42 +0000 (-0500) Subject: mon: filter out ceph normal ceph entity types when dumping service metadata X-Git-Tag: v15.1.1~263^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dfc056028e44cdbda84d7118e29120ae70edb35a;p=ceph.git mon: filter out ceph normal ceph entity types when dumping service metadata Signed-off-by: Venky Shankar --- diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 469cc17e3354..254ccc07165a 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -2963,11 +2963,7 @@ void Monitor::get_cluster_status(stringstream &ss, Formatter *f) for (auto& p : service_map.services) { const std::string &service = p.first; // filter out normal ceph entity types - if (service == "osd" || - service == "client" || - service == "mon" || - service == "mds" || - service == "mgr") { + if (ServiceMap::is_normal_ceph_entity(service)) { continue; } ss << " " << p.first << ": " << string(maxlen - p.first.size(), ' ') @@ -3797,7 +3793,11 @@ void Monitor::handle_command(MonOpRequestRef op) f->close_section(); for (auto& p : mgrstatmon()->get_service_map().services) { - f->open_object_section(p.first.c_str()); + auto &service = p.first; + if (ServiceMap::is_normal_ceph_entity(service)) { + continue; + } + f->open_object_section(service.c_str()); map m; p.second.count_metadata("ceph_version", &m); for (auto& q : m) {