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 <adking@redhat.com>
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