From: Sage Weil Date: Mon, 29 Nov 2021 20:51:26 +0000 (-0500) Subject: pacific: mgr/cephadm: avoid repeated calls to get_module_option X-Git-Tag: v16.2.8~265^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=799dcefb1a61849e4179803ea60eeb786707ae6c;p=ceph.git 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 --- diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index d2cc4050c4da..09a50ed5c62f 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 26a92571da13..69814236e810 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']