From: Alfredo Deza Date: Fri, 27 Sep 2013 16:07:12 +0000 (-0400) Subject: use the cuttlefish-compatible mon_status command X-Git-Tag: v1.2.7~8^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F92%2Fhead;p=ceph-deploy.git use the cuttlefish-compatible mon_status command --- diff --git a/ceph_deploy/mon.py b/ceph_deploy/mon.py index 5f50d26..6e86593 100644 --- a/ceph_deploy/mon.py +++ b/ceph_deploy/mon.py @@ -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 )