From: Tomer Haskalovitch Date: Tue, 17 Feb 2026 11:57:57 +0000 (+0200) Subject: check if enabled X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4f444dbcd232d6366f692d6a0c176467e230eb4a;p=ceph-ci.git check if enabled --- diff --git a/src/pybind/mgr/orchestrator/module.py b/src/pybind/mgr/orchestrator/module.py index 0194d54abea..30b8372fc2b 100644 --- a/src/pybind/mgr/orchestrator/module.py +++ b/src/pybind/mgr/orchestrator/module.py @@ -2109,7 +2109,18 @@ Usage: return self._apply_misc([spec], dry_run, format, no_overwrite) + def _is_module_enabled(self, module: str) -> bool: + mgr_map = self.get('mgr_map') + return ( + module in mgr_map.get('modules', []) + or module in mgr_map.get('always_on_modules', []) + ) + + + def _create_nvmeof_metadata_pool_if_needed(self) -> None: + if not self._is_module_enabled('nvmeof'): + raise OrchestratorError('nvmeof module must be enabled to use .nvmeof pool') self.remote('nvmeof', 'create_pool_if_not_exists') @OrchestratorCLICommand.Write('orch apply nvmeof')