]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm:Moved 'ownership' of the checker to cephadm
authorPaul Cuzner <pcuzner@redhat.com>
Thu, 18 Feb 2021 03:11:55 +0000 (16:11 +1300)
committerPaul Cuzner <pcuzner@redhat.com>
Mon, 1 Mar 2021 22:59:11 +0000 (11:59 +1300)
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 <pcuzner@redhat.com>
src/pybind/mgr/cephadm/serve.py

index 8af36fba473adfc3508c0312fd4f811977c12b47..b4443db56b79ccdd4a199efc75a0483659168543 100644 (file)
@@ -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 [