]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
use the cuttlefish-compatible mon_status command 92/head
authorAlfredo Deza <alfredo.deza@inktank.com>
Fri, 27 Sep 2013 16:07:12 +0000 (12:07 -0400)
committerAlfredo Deza <alfredo.deza@inktank.com>
Fri, 27 Sep 2013 16:24:52 +0000 (12:24 -0400)
ceph_deploy/mon.py

index 5f50d266b0c565f95295056af2dbcead448f7aff..6e865930e8334ba6350ae2db2ad8767a842eb135 100644 (file)
@@ -24,13 +24,23 @@ LOG = logging.getLogger(__name__)
 def mon_status_check(conn, logger, hostname, exit=False):
     """
     A direct check for JSON output on the monitor status.
+
+    For newer versions of Ceph (dumpling and newer) a new mon_status command
+    was added ( `ceph daemon mon mon_status` ) and should be revisited if the
+    output changes as this check depends on that availability.
+
     WARNING: this function requires the new connection object
     """
     mon = 'mon.%s' % hostname
 
     out, err, code = process.check(
         conn,
-        ['ceph', 'daemon', mon, 'mon_status'],
+        [
+            'ceph',
+            '--admin-daemon',
+            '/var/run/ceph/ceph-%s.asok' % mon,
+            'mon_status',
+        ],
         exit=exit
     )