]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/test_orchestrator: validate drive group matches anything.
authorSebastian Wagner <sebastian.wagner@suse.com>
Tue, 10 Mar 2020 09:54:20 +0000 (10:54 +0100)
committerSebastian Wagner <sebastian.wagner@suse.com>
Tue, 10 Mar 2020 12:28:23 +0000 (13:28 +0100)
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
src/pybind/mgr/test_orchestrator/module.py

index c82b4b82189243c4f9d54eb98772bddadb559cc5..f4b624a31c978a0e87ce524f3afcd9e812750116 100644 (file)
@@ -256,6 +256,9 @@ class TestOrchestrator(MgrModule, orchestrator.Orchestrator):
         def run(all_hosts):
             # type: (List[orchestrator.HostSpec]) -> None
             drive_group.validate()
+            if drive_group.placement.host_pattern:
+                if not drive_group.placement.pattern_matches_hosts(all_hosts):
+                    raise orchestrator.OrchestratorValidationError('failed to match')
         return self.get_hosts().then(run).then(
             on_complete=orchestrator.ProgressReference(
                 message='create_osds',