]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: helper function to check if a service is a normal ceph service
authorVenky Shankar <vshankar@redhat.com>
Sat, 8 Feb 2020 09:36:42 +0000 (04:36 -0500)
committerVenky Shankar <vshankar@redhat.com>
Tue, 18 Feb 2020 04:45:45 +0000 (23:45 -0500)
This would be widely required since ceph metadata server entries are
maintained in service map (DaemonServer::pending_service_map). Such
normal ceph services would need to filtered when processing the service
map to avoid extraneous entries getting processed.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
src/mgr/ServiceMap.h

index 3b6dd72068c2ca40073291452bc51924ff2d6bb1..169038f3044750927949e9dbd8a4c41d3103de76 100644 (file)
@@ -138,6 +138,18 @@ struct ServiceMap {
     }
     return true;
   }
+
+  static inline bool is_normal_ceph_entity(std::string_view type) {
+    if (type == "osd" ||
+        type == "client" ||
+        type == "mon" ||
+        type == "mds" ||
+        type == "mgr") {
+      return true;
+    }
+
+    return false;
+  }
 };
 WRITE_CLASS_ENCODER_FEATURES(ServiceMap)
 WRITE_CLASS_ENCODER_FEATURES(ServiceMap::Service)