From: Adam King Date: Wed, 26 May 2021 16:16:38 +0000 (-0400) Subject: mgr/cephadm: fix --service-type flag in orch ls when service has id X-Git-Tag: v16.2.5~49^2~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c34a5c9a08b3cc3ef3f3b406b5bc04212d9e4f12;p=ceph.git mgr/cephadm: fix --service-type flag in orch ls when service has id The running daemon count comes out wrong if the service type is for a service that has an id. Fixes: https://tracker.ceph.com/issues/50981 Signed-off-by: Adam King (cherry picked from commit 29ad6b45f313e3c201c6e11d4087e1581b30b617) --- diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index cde603154deb..39a470c9dbae 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -1747,8 +1747,7 @@ Then run the following: if ( service_type - and service_type != n - and not dd.daemon_type.startswith(n + '.') + and service_type != daemon_type_to_service(dd.daemon_type) ): continue if service_name and service_name != n: