]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
pacific: mgr/cephadm: avoid repeated calls to get_module_option 44535/head
authorSage Weil <sage@newdream.net>
Mon, 29 Nov 2021 20:51:26 +0000 (15:51 -0500)
committerAdam King <adking@redhat.com>
Tue, 11 Jan 2022 17:20:18 +0000 (12:20 -0500)
We already stash these as MgrModule members.

Signed-off-by: Sage Weil <sage@newdream.net>
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
src/pybind/mgr/cephadm/serve.py

index d2cc4050c4da854a86adee2db479b3290476fd70..09a50ed5c62f5d2805bc64330ede7b42238224ed 100644 (file)
@@ -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]] = {}
index 26a92571da133bc788d2dd030842dcc34d2f2666..69814236e8108095175803e02ba017cbf2a8bc16 100644 (file)
@@ -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']