]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
task: ceph_manager: add 'get_mon_health' function
authorJoao Eduardo Luis <jecluis@gmail.com>
Fri, 4 Jan 2013 17:03:55 +0000 (17:03 +0000)
committerJoao Eduardo Luis <jecluis@gmail.com>
Fri, 4 Jan 2013 17:03:55 +0000 (17:03 +0000)
Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
teuthology/task/ceph_manager.py

index 69aa07995df75fc353b7bfedbc63df1ad4463f3f..51c2f2febc9e761e6dd92913ecc640f733de9109 100644 (file)
@@ -605,3 +605,9 @@ class CephManager:
                     'failed to reach quorum size %d before timeout expired' % size
             time.sleep(3)
         self.log("quorum is size %d" % size)
+
+    def get_mon_health(self, debug=False):
+      out = self.raw_cluster_cmd('health', '--format=json')
+      if debug:
+        self.log('health:\n{h}'.format(h=out))
+      return json.loads(out)