From f859d19926b30c2adf764cda31bc7c10b745588c Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Tue, 10 Mar 2020 10:54:20 +0100 Subject: [PATCH] mgr/test_orchestrator: validate drive group matches anything. Signed-off-by: Sebastian Wagner --- src/pybind/mgr/test_orchestrator/module.py | 3 +++ 1 file changed, 3 insertions(+) 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', -- 2.39.5