From 59b3969253af022d841234cc0fa4894465b78e51 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Fri, 27 Sep 2013 12:07:12 -0400 Subject: [PATCH] use the cuttlefish-compatible mon_status command --- ceph_deploy/mon.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 ) -- 2.47.3