From: Adam King Date: Tue, 16 Apr 2024 19:51:20 +0000 (-0400) Subject: mgr/cephadm: cleanup service size logic block X-Git-Tag: v20.0.0~2045^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ed68c6e5ff16fca023a31422c20bafcd01743ac2;p=ceph.git 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 --- 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,