From: Sebastian Wagner Date: Tue, 10 Mar 2020 09:54:20 +0000 (+0100) Subject: mgr/test_orchestrator: validate drive group matches anything. X-Git-Tag: v15.1.1~33^2~3 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=f859d19926b30c2adf764cda31bc7c10b745588c;p=ceph-ci.git mgr/test_orchestrator: validate drive group matches anything. Signed-off-by: Sebastian Wagner --- diff --git a/src/pybind/mgr/test_orchestrator/module.py b/src/pybind/mgr/test_orchestrator/module.py index c82b4b82189..f4b624a31c9 100644 --- a/src/pybind/mgr/test_orchestrator/module.py +++ b/src/pybind/mgr/test_orchestrator/module.py @@ -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',