From b481b7de6b9944bcf4adfd9a6e76828ca85dae0f Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 10 Mar 2021 08:32:11 -0500 Subject: [PATCH] mgr/cephadm: handle bare 'count-per-host:NNN', fix comments Signed-off-by: Sage Weil --- src/pybind/mgr/cephadm/schedule.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pybind/mgr/cephadm/schedule.py b/src/pybind/mgr/cephadm/schedule.py index 923eebebf929..1a72744462b1 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 -- 2.47.3