]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: filter out normal ceph services when processing service map
authorVenky Shankar <vshankar@redhat.com>
Sat, 8 Feb 2020 03:01:30 +0000 (22:01 -0500)
committerVenky Shankar <vshankar@redhat.com>
Thu, 26 Mar 2020 02:45:13 +0000 (22:45 -0400)
This is done is couple of places in ceph manager -- when culling
entries from service map and the other when dumping serice status.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit 20139d12423fc6154b57499c576d1e4bb3f1eade)

 Conflicts:
src/mgr/DaemonServer.cc

Switch to non-initializer list in range-based for loop.

src/mgr/DaemonServer.cc

index 75ff7c39685f763fbf256b3df3592afc4e79d5f7..cb57d13e65cfb4b9e680d4e8b739ecd7860cdfc7 100644 (file)
@@ -959,6 +959,10 @@ bool DaemonServer::_handle_command(
     // only include state from services that are in the persisted service map
     f->open_object_section("service_status");
     for (auto& p : pending_service_map.services) {
+      if (ServiceMap::is_normal_ceph_entity(p.first)) {
+        continue;
+      }
+
       f->open_object_section(p.first.c_str());
       for (auto& q : p.second.daemons) {
        f->open_object_section(q.first.c_str());
@@ -2754,6 +2758,10 @@ void DaemonServer::got_service_map()
   // cull missing daemons, populate new ones
   std::set<std::string> types;
   for (auto& p : pending_service_map.services) {
+    if (ServiceMap::is_normal_ceph_entity(p.first)) {
+      continue;
+    }
+
     types.insert(p.first);
 
     std::set<std::string> names;