]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
attempt to give some info about the actual mon status 67/head
authorAlfredo Deza <alfredo.deza@inktank.com>
Fri, 6 Sep 2013 21:39:32 +0000 (17:39 -0400)
committerAlfredo Deza <alfredo.deza@inktank.com>
Fri, 6 Sep 2013 21:39:32 +0000 (17:39 -0400)
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
ceph_deploy/mon.py

index 90a705bd1b2bfd7f79d0bde7785a9cf5a498314e..1dfa6558e20a7a1c3285df85be082694eff1f93e 100644 (file)
@@ -16,7 +16,7 @@ from . import hosts
 LOG = logging.getLogger(__name__)
 
 
-def mon_status(conn, logger, hostname):
+def mon_status(conn, logger, hostname, silent=False):
     """
     run ``ceph daemon mon.`hostname` mon_status`` on the remote end and provide
     not only the output, but be able to return a boolean status of what is
@@ -33,6 +33,12 @@ def mon_status(conn, logger, hostname):
         )
 
         mon_info = json.loads(out)
+        if not silent:
+            logger.debug('*'*80)
+            logger.debug('status for monitor: %s' % mon)
+            for k, v in mon_info.items():
+                logger.debug('%s: %s' % (k, v))
+            logger.debug('*'*80)
         if mon_info['rank'] >= 0:
             return True
         return False