From: Alfredo Deza Date: Wed, 11 Sep 2013 13:21:27 +0000 (-0400) Subject: close the pushy connection before calling status X-Git-Tag: v1.2.4~10^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d5703d54b868f7c4fb7b229d88f2b8477e1d1d53;p=ceph-deploy.git close the pushy connection before calling status Signed-off-by: Alfredo Deza --- diff --git a/ceph_deploy/mon.py b/ceph_deploy/mon.py index f4133fa..fc268bf 100644 --- a/ceph_deploy/mon.py +++ b/ceph_deploy/mon.py @@ -27,12 +27,13 @@ def mon_status(conn, logger, hostname, silent=False): running, while ``True`` would mean the monitor is up and running correctly. """ mon = 'mon.%s' % hostname - conn = Connection(hostname, logger=logger, sudo=True) + rconn = Connection(hostname, logger=logger, sudo=True) try: out, err, code = process.check( - conn, - ['ceph', 'daemon', mon, 'mon_status'] + rconn, + ['ceph', 'daemon', mon, 'mon_status'], + exit=True ) for line in err: @@ -104,8 +105,8 @@ def mon_create(args): # tell me the status of the deployed mon time.sleep(2) # give some room to start - mon_status(distro.sudo_conn, rlogger, name) distro.sudo_conn.close() + mon_status(None, rlogger, name) except RuntimeError as e: LOG.error(e)