mirror of
https://github.com/ceph/ceph
synced 2025-02-23 11:07:35 +00:00
mgr/cephadm: avoid repeated calls to get_module_option
We already stash these as MgrModule members. Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
parent
22c402b84e
commit
1bbac481f3
@ -426,6 +426,7 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule,
|
||||
self.agent_starting_port = 0
|
||||
self.apply_spec_fails: List[Tuple[str, str]] = []
|
||||
self.max_osd_draining_count = 10
|
||||
self.device_enhanced_scan = False
|
||||
|
||||
self.notify('mon_map', None)
|
||||
self.config_notify()
|
||||
@ -2216,7 +2217,7 @@ Then run the following:
|
||||
except Exception:
|
||||
pass
|
||||
deps = sorted([self.get_mgr_ip(), server_port, root_cert,
|
||||
str(self.get_module_option('device_enhanced_scan'))])
|
||||
str(self.device_enhanced_scan)])
|
||||
elif daemon_type == 'iscsi':
|
||||
deps = [self.get_mgr_ip()]
|
||||
else:
|
||||
|
@ -400,7 +400,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']
|
||||
|
@ -1035,7 +1035,7 @@ class CephadmAgent(CephService):
|
||||
'refresh_period': self.mgr.agent_refresh_rate,
|
||||
'listener_port': self.mgr.agent_starting_port,
|
||||
'host': daemon_spec.host,
|
||||
'device_enhanced_scan': str(self.mgr.get_module_option('device_enhanced_scan'))}
|
||||
'device_enhanced_scan': str(self.mgr.device_enhanced_scan)}
|
||||
|
||||
listener_cert, listener_key = self.mgr.cherrypy_thread.ssl_certs.generate_cert(
|
||||
self.mgr.inventory.get_addr(daemon_spec.host))
|
||||
|
Loading…
Reference in New Issue
Block a user