From 7ce1f790f375dfcbda73a6ec8d7db18f35484e2f Mon Sep 17 00:00:00 2001 From: Adam King Date: Tue, 2 Apr 2024 09:21:08 -0400 Subject: [PATCH] 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 --- src/pybind/mgr/cephadm/module.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index b93cb7f3096fa..a2a5fac75b6b2 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 -- 2.47.3