]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: fix node-proxy service size 56637/head
authorAdam King <adking@redhat.com>
Tue, 2 Apr 2024 13:21:08 +0000 (09:21 -0400)
committerAdam King <adking@redhat.com>
Tue, 2 Apr 2024 13:21:08 +0000 (09:21 -0400)
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>
src/pybind/mgr/cephadm/module.py

index b93cb7f3096fa0a6fea3fc087b2db2faebe1faae..a2a5fac75b6b20d426c063b3b8e38e9e390f4687 100644 (file)
@@ -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