]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: fix --service-type flag in orch ls when service has id
authorAdam King <adking@redhat.com>
Wed, 26 May 2021 16:16:38 +0000 (12:16 -0400)
committerSebastian Wagner <sewagner@redhat.com>
Thu, 17 Jun 2021 08:47:00 +0000 (10:47 +0200)
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 <adking@redhat.com>
(cherry picked from commit 29ad6b45f313e3c201c6e11d4087e1581b30b617)

src/pybind/mgr/cephadm/module.py

index cde603154deb3185e1a1c014062d6f7f4e118f95..39a470c9dbae8dba7d801b5f126b9baf2b69c132 100644 (file)
@@ -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: