]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/cephadm: cleanup service size logic block
authorAdam King <adking@redhat.com>
Tue, 16 Apr 2024 19:51:20 +0000 (15:51 -0400)
committerAdam King <adking@redhat.com>
Tue, 30 Apr 2024 19:38:52 +0000 (15:38 -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>
(cherry picked from commit ed68c6e5ff16fca023a31422c20bafcd01743ac2)

src/pybind/mgr/cephadm/module.py

index 718c88098696d17e423454ff10ea9a4507ed18a7..7303ba179b174da55b17c4e7166d8aee788b9235 100644 (file)
@@ -2239,8 +2239,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
@@ -2248,8 +2249,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,