From: Adam King Date: Tue, 2 Apr 2024 13:21:08 +0000 (-0400) Subject: mgr/cephadm: fix node-proxy service size X-Git-Tag: v20.0.0~2198^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F56637%2Fhead;p=ceph.git mgr/cephadm: fix node-proxy service size We only actually deploy node-proxy on hosts that we were given oob info for. without this patch, with no oob info and 10 hosts, the service would report 0/10 daemons running. This gives the impression the daemons are failing to be placed in some way. This change makes it so the size of the service match the actual number of hosts cephadm is planning to deploy the daemons on. Signed-off-by: Adam King --- diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index b93cb7f3096f..a2a5fac75b6b 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -2232,8 +2232,14 @@ Then run the following: if service_name is not None and service_name != nm: continue - if spec.service_type != 'osd': + if spec.service_type not in ['osd', 'node-proxy']: size = spec.placement.get_target_count(self.cache.get_schedulable_hosts()) + 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 + schedulable_hosts = self.cache.get_schedulable_hosts() + 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