]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: cleanup service size logic block 56933/head
authorAdam King <adking@redhat.com>
Tue, 16 Apr 2024 19:51:20 +0000 (15:51 -0400)
committerAdam King <adking@redhat.com>
Tue, 16 Apr 2024 19:51:20 +0000 (15:51 -0400)
Non-functional cleanup as it was pointed out this
block was written in an unintuitive way.

Signed-off-by: Adam King <adking@redhat.com>
src/pybind/mgr/cephadm/module.py

index 49eab78fe70e6a63d4089666fa1d2f32e9df2f3c..df88e0147d167f2421c25b7c6b928a105e8a58ef 100644 (file)
@@ -2259,8 +2259,9 @@ Then run the following:
             if service_name is not None and service_name != nm:
                 continue
 
-            if spec.service_type not in ['osd', 'node-proxy']:
-                size = spec.placement.get_target_count(self.cache.get_schedulable_hosts())
+            if spec.service_type == 'osd':
+                # osd counting is special
+                size = 0
             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
@@ -2268,8 +2269,7 @@ Then run the following:
                 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
+                size = spec.placement.get_target_count(self.cache.get_schedulable_hosts())
 
             sm[nm] = orchestrator.ServiceDescription(
                 spec=spec,