From: Sage Weil Date: Wed, 10 Mar 2021 13:32:11 +0000 (-0500) Subject: mgr/cephadm: handle bare 'count-per-host:NNN', fix comments X-Git-Tag: v16.2.0~106^2~30 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8b2be954736662ee20021d9a0c2d708261bfb22d;p=ceph.git mgr/cephadm: handle bare 'count-per-host:NNN', fix comments Signed-off-by: Sage Weil (cherry picked from commit b481b7de6b9944bcf4adfd9a6e76828ca85dae0f) --- diff --git a/src/pybind/mgr/cephadm/schedule.py b/src/pybind/mgr/cephadm/schedule.py index 923eebebf92..1a72744462b 100644 --- a/src/pybind/mgr/cephadm/schedule.py +++ b/src/pybind/mgr/cephadm/schedule.py @@ -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 - 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