From 8dfac4381c895d9e42ee4708420064c90973166e Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Mon, 10 Feb 2014 13:59:25 -0600 Subject: [PATCH] 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 --- teuthology/orchestra/remote.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/teuthology/orchestra/remote.py b/teuthology/orchestra/remote.py index f38fccae53..24b9453c42 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 -- 2.39.5