From 799dcefb1a61849e4179803ea60eeb786707ae6c Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 29 Nov 2021 15:51:26 -0500 Subject: [PATCH] pacific: mgr/cephadm: avoid repeated calls to get_module_option We already stash these as MgrModule members. Signed-off-by: Sage Weil Conflicts: src/pybind/mgr/cephadm/module.py src/pybind/mgr/cephadm/serve.py src/pybind/mgr/cephadm/services/cephadmservice.py --- src/pybind/mgr/cephadm/module.py | 1 + src/pybind/mgr/cephadm/serve.py | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index d2cc4050c4da8..09a50ed5c62f5 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -409,6 +409,7 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule, self.autotune_interval = 0 self.apply_spec_fails: List[Tuple[str, str]] = [] self.max_osd_draining_count = 10 + self.device_enhanced_scan = False self._cons: Dict[str, Tuple[remoto.backends.BaseConnection, remoto.backends.LegacyModuleExecute]] = {} diff --git a/src/pybind/mgr/cephadm/serve.py b/src/pybind/mgr/cephadm/serve.py index 26a92571da133..69814236e8108 100644 --- a/src/pybind/mgr/cephadm/serve.py +++ b/src/pybind/mgr/cephadm/serve.py @@ -439,8 +439,7 @@ class CephadmServe: return None def _refresh_host_devices(self, host: str) -> Optional[str]: - - with_lsm = self.mgr.get_module_option('device_enhanced_scan') + with_lsm = self.mgr.device_enhanced_scan inventory_args = ['--', 'inventory', '--format=json-pretty', '--filter-for-batch'] -- 2.39.5