From: Paul Cuzner Date: Thu, 18 Feb 2021 03:11:55 +0000 (+1300) Subject: mgr/cephadm:Moved 'ownership' of the checker to cephadm X-Git-Tag: v17.1.0~2673^2~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9ef3bb373362acb4436d3a6d32e290a713edc26a;p=ceph.git mgr/cephadm:Moved 'ownership' of the checker to cephadm Initial implementation used the Serve class as the owner of the configuration checker. This patch moves the checker up to the cephadm module itself, to make the CLI command logic cleaner Signed-off-by: Paul Cuzner --- diff --git a/src/pybind/mgr/cephadm/serve.py b/src/pybind/mgr/cephadm/serve.py index 8af36fba473..b4443db56b7 100644 --- a/src/pybind/mgr/cephadm/serve.py +++ b/src/pybind/mgr/cephadm/serve.py @@ -53,7 +53,6 @@ class CephadmServe: def __init__(self, mgr: "CephadmOrchestrator"): self.mgr: "CephadmOrchestrator" = mgr self.log = logger - self.config_checker = CephadmConfigChecks(self.mgr) def serve(self) -> None: """ @@ -63,7 +62,7 @@ class CephadmServe: of cephadm. This loop will then attempt to apply this new state. """ self.log.debug("serve starting") - self.config_checker.load_network_config() + self.mgr.config_checker.load_network_config() while self.mgr.run: @@ -185,7 +184,7 @@ class CephadmServe: refresh(self.mgr.cache.get_hosts()) - self.config_checker.run_checks() + self.mgr.config_checker.run_checks() health_changed = False for k in [