From: Alfredo Deza Date: Fri, 6 Sep 2013 21:39:32 +0000 (-0400) Subject: attempt to give some info about the actual mon status X-Git-Tag: v1.2.4~16^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=17341f2d4ea0d54acace3c1482ccb505576f446e;p=ceph-deploy.git attempt to give some info about the actual mon status Signed-off-by: Alfredo Deza --- diff --git a/ceph_deploy/mon.py b/ceph_deploy/mon.py index 90a705b..1dfa655 100644 --- a/ceph_deploy/mon.py +++ b/ceph_deploy/mon.py @@ -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