From: Zack Cerza Date: Mon, 10 Feb 2014 19:59:25 +0000 (-0600) Subject: Make Remote.is_online more accurate X-Git-Tag: 1.1.0~1646^2~29 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8dfac4381c895d9e42ee4708420064c90973166e;p=teuthology.git Make Remote.is_online more accurate To really know if the connection is active, we need to read something from the remote host. Signed-off-by: Zack Cerza --- diff --git a/teuthology/orchestra/remote.py b/teuthology/orchestra/remote.py index f38fccae5..24b9453c4 100644 --- a/teuthology/orchestra/remote.py +++ b/teuthology/orchestra/remote.py @@ -60,6 +60,10 @@ class Remote(object): @property def is_online(self): + try: + self.run(args="echo online") + except Exception: + pass return self.ssh.get_transport().is_active() @property