From: Venky Shankar Date: Sat, 8 Feb 2020 09:36:42 +0000 (-0500) Subject: mgr: helper function to check if a service is a normal ceph service X-Git-Tag: v15.1.1~263^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=79503fc16749ed0cfe8a89ea3b3c8c792d6b8809;p=ceph.git mgr: helper function to check if a service is a normal ceph service 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 --- diff --git a/src/mgr/ServiceMap.h b/src/mgr/ServiceMap.h index 3b6dd72068c2..169038f30447 100644 --- a/src/mgr/ServiceMap.h +++ b/src/mgr/ServiceMap.h @@ -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)