]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Make Remote.is_online more accurate
authorZack Cerza <zack@cerza.org>
Mon, 10 Feb 2014 19:59:25 +0000 (13:59 -0600)
committerZack Cerza <zack@cerza.org>
Thu, 20 Feb 2014 23:46:07 +0000 (17:46 -0600)
To really know if the connection is active, we need to read something
from the remote host.

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
teuthology/orchestra/remote.py

index f38fccae53276d127191edec41b5e96568464c56..24b9453c427640289facc23d60e63dbfc478713e 100644 (file)
@@ -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