From 051361e22246120331795b70513beaaff29ceb51 Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Fri, 31 Jul 2020 11:06:35 +0200 Subject: [PATCH] mgr/cephadm: get_daemons_by_service should use dd.service_name daemon_name does not necessarily starts with the service_name. Especially not for OSDs. Signed-off-by: Sebastian Wagner --- src/pybind/mgr/cephadm/inventory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybind/mgr/cephadm/inventory.py b/src/pybind/mgr/cephadm/inventory.py index 613b6066952b4..7c6b1e77c95f7 100644 --- a/src/pybind/mgr/cephadm/inventory.py +++ b/src/pybind/mgr/cephadm/inventory.py @@ -375,7 +375,7 @@ class HostCache(): result = [] # type: List[orchestrator.DaemonDescription] for host, dm in self.daemons.items(): for name, d in dm.items(): - if name.startswith(service_name + '.'): + if d.service_name() == service_name: result.append(d) return result -- 2.39.5