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: v14.2.10~168^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8a103e2d20d32afe03e8c676a6117dce99751bef;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 (cherry picked from commit 79503fc16749ed0cfe8a89ea3b3c8c792d6b8809) --- diff --git a/src/mgr/ServiceMap.h b/src/mgr/ServiceMap.h index f634e18c8203..c0cd65c8b7e8 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)