From ed68c6e5ff16fca023a31422c20bafcd01743ac2 Mon Sep 17 00:00:00 2001 From: Adam King Date: Tue, 16 Apr 2024 15:51:20 -0400 Subject: [PATCH] mgr/cephadm: cleanup service size logic block Non-functional cleanup as it was pointed out this block was written in an unintuitive way. Signed-off-by: Adam King --- src/pybind/mgr/cephadm/module.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index 49eab78fe70e..df88e0147d16 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -2259,8 +2259,9 @@ Then run the following: if service_name is not None and service_name != nm: continue - if spec.service_type not in ['osd', 'node-proxy']: - size = spec.placement.get_target_count(self.cache.get_schedulable_hosts()) + if spec.service_type == 'osd': + # osd counting is special + size = 0 elif spec.service_type == 'node-proxy': # we only deploy node-proxy daemons on hosts we have oob info for # Let's make the expected daemon count `orch ls` displays reflect that @@ -2268,8 +2269,7 @@ Then run the following: oob_info_hosts = [h for h in schedulable_hosts if h.hostname in self.node_proxy_cache.oob.keys()] size = spec.placement.get_target_count(oob_info_hosts) else: - # osd counting is special - size = 0 + size = spec.placement.get_target_count(self.cache.get_schedulable_hosts()) sm[nm] = orchestrator.ServiceDescription( spec=spec, -- 2.47.3