Skip to content

Commit 7ce1f79

Browse files
committed
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 <[email protected]>
1 parent a2cd8d5 commit 7ce1f79

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/pybind/mgr/cephadm/module.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2232,8 +2232,14 @@ def describe_service(self, service_type: Optional[str] = None, service_name: Opt
22322232
if service_name is not None and service_name != nm:
22332233
continue
22342234

2235-
if spec.service_type != 'osd':
2235+
if spec.service_type not in ['osd', 'node-proxy']:
22362236
size = spec.placement.get_target_count(self.cache.get_schedulable_hosts())
2237+
elif spec.service_type == 'node-proxy':
2238+
# we only deploy node-proxy daemons on hosts we have oob info for
2239+
# Let's make the expected daemon count `orch ls` displays reflect that
2240+
schedulable_hosts = self.cache.get_schedulable_hosts()
2241+
oob_info_hosts = [h for h in schedulable_hosts if h.hostname in self.node_proxy_cache.oob.keys()]
2242+
size = spec.placement.get_target_count(oob_info_hosts)
22372243
else:
22382244
# osd counting is special
22392245
size = 0

0 commit comments

Comments
 (0)