]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
catch a possible non-json response from the status command 69/head
authorAlfredo Deza <alfredo.deza@inktank.com>
Mon, 9 Sep 2013 13:03:29 +0000 (09:03 -0400)
committerAlfredo Deza <alfredo.deza@inktank.com>
Mon, 9 Sep 2013 13:03:29 +0000 (09:03 -0400)
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
ceph_deploy/mon.py

index 1dfa6558e20a7a1c3285df85be082694eff1f93e..e88241436d937f56f96423ef36382cfa2d4670ba 100644 (file)
@@ -32,7 +32,11 @@ def mon_status(conn, logger, hostname, silent=False):
             ['ceph', 'daemon', mon, 'mon_status']
         )
 
-        mon_info = json.loads(out)
+        try:
+            mon_info = json.loads(out)
+        except ValueError:
+            logger.warning('monitor: %s, might not be running yet' % mon)
+            return False
         if not silent:
             logger.debug('*'*80)
             logger.debug('status for monitor: %s' % mon)