]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: move _update_paused_health to serve.py
authorSebastian Wagner <sebastian.wagner@suse.com>
Fri, 11 Sep 2020 11:14:13 +0000 (13:14 +0200)
committerSebastian Wagner <sebastian.wagner@suse.com>
Wed, 18 Nov 2020 10:52:17 +0000 (11:52 +0100)
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
(cherry picked from commit e927ccfdde6f90b893c8cbd73e17fad50a7d76d9)

src/pybind/mgr/cephadm/module.py
src/pybind/mgr/cephadm/serve.py

index e7b4f2e4f7d2b13039c355baa87a7dd5ab086170..06cd08997ff689cc054983c6a40eb1c55ce4a93b 100644 (file)
@@ -467,20 +467,6 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule):
             'who': entity,
         })
 
-    def _update_paused_health(self):
-        if self.paused:
-            self.health_checks['CEPHADM_PAUSED'] = {
-                'severity': 'warning',
-                'summary': 'cephadm background work is paused',
-                'count': 1,
-                'detail': ["'ceph orch resume' to resume"],
-            }
-            self.set_health_checks(self.health_checks)
-        else:
-            if 'CEPHADM_PAUSED' in self.health_checks:
-                del self.health_checks['CEPHADM_PAUSED']
-                self.set_health_checks(self.health_checks)
-
     def config_notify(self):
         """
         This method is called whenever one of our config options is changed.
index bf402a9808452a00bd0676c4c5545e6634e471dd..74cb760c086a9d5d116a7f793e42ef7894e290ab 100644 (file)
@@ -54,7 +54,7 @@ class CephadmServe:
 
                 self._check_for_strays()
 
-                self.mgr._update_paused_health()
+                self._update_paused_health()
 
                 if not self.mgr.paused:
                     self.mgr.rm_util.process_removal_queue()
@@ -84,6 +84,20 @@ class CephadmServe:
         ret = self.mgr.event.wait(sleep_interval)
         self.mgr.event.clear()
 
+    def _update_paused_health(self):
+        if self.mgr.paused:
+            self.mgr.health_checks['CEPHADM_PAUSED'] = {
+                'severity': 'warning',
+                'summary': 'cephadm background work is paused',
+                'count': 1,
+                'detail': ["'ceph orch resume' to resume"],
+            }
+            self.mgr.set_health_checks(self.mgr.health_checks)
+        else:
+            if 'CEPHADM_PAUSED' in self.mgr.health_checks:
+                del self.mgr.health_checks['CEPHADM_PAUSED']
+                self.mgr.set_health_checks(self.mgr.health_checks)
+
     def _refresh_hosts_and_daemons(self) -> None:
         bad_hosts = []
         failures = []