From eccb4cfe289896bc2606dd32faeda8e57f9b2b97 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 (cherry picked from commit ed68c6e5ff16fca023a31422c20bafcd01743ac2) --- 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 718c88098696..7303ba179b17 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -2239,8 +2239,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 @@ -2248,8 +2249,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