]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/orch: PlacementSpec: do not combine all_hosts with anything else
authorSage Weil <sage@redhat.com>
Fri, 28 Feb 2020 16:17:50 +0000 (10:17 -0600)
committerSage Weil <sage@redhat.com>
Sun, 1 Mar 2020 20:19:35 +0000 (14:19 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
src/pybind/mgr/orchestrator/_interface.py

index 9b9fb4df25435fda21c22a161fbbedd978a13247..7adee48d7fe1b3d1b1d5bd90890a723eb9080981 100644 (file)
@@ -1228,6 +1228,8 @@ class PlacementSpec(object):
     """
     def __init__(self, label=None, hosts=None, count=None, all_hosts=False):
         # type: (Optional[str], Optional[List], Optional[int], bool) -> None
+        if all_hosts and (count or hosts or label):
+            raise OrchestratorValidationError('cannot combine all:true and count|hosts|label')
         self.label = label
         self.hosts = []  # type: List[HostPlacementSpec]
         if hosts: