]> git.apps.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>
Thu, 26 Mar 2020 02:45:13 +0000 (22:45 -0400)
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>
(cherry picked from commit 79503fc16749ed0cfe8a89ea3b3c8c792d6b8809)

src/mgr/ServiceMap.h

index f634e18c8203cd4b7b5d4ca7ce8b380320b51e35..c0cd65c8b7e86e9eaabe383700a6a2d5fb22b721 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)