]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: handle bare 'count-per-host:NNN', fix comments
authorSage Weil <sage@newdream.net>
Wed, 10 Mar 2021 13:32:11 +0000 (08:32 -0500)
committerSage Weil <sage@newdream.net>
Tue, 16 Mar 2021 12:56:18 +0000 (07:56 -0500)
Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit b481b7de6b9944bcf4adfd9a6e76828ca85dae0f)

src/pybind/mgr/cephadm/schedule.py

index 923eebebf929d73917a6bdc21cc2f43371e023ab..1a72744462b1950dd793bb2303bbcd12a17fe8f8 100644 (file)
@@ -182,9 +182,10 @@ class HostAssignment(object):
                 HostPlacementSpec(x, '', '')
                 for x in self.spec.placement.filter_matching_hostspecs(self.hosts)
             ]
-        # If none of the above and also no <count>
-        elif self.spec.placement.count is not None:
-            # backward compatibility: consider an empty placements to be the same pattern = *
+        elif (
+                self.spec.placement.count is not None
+                or self.spec.placement.count_per_host is not None
+        ):
             hosts = [
                 HostPlacementSpec(x.hostname, '', '')
                 for x in self.hosts