]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Revert "orchestra/remote.py: use ensure_online() helper in run()" 1469/head
authorKefu Chai <kchai@redhat.com>
Mon, 11 May 2020 13:26:13 +0000 (21:26 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 11 May 2020 13:27:10 +0000 (21:27 +0800)
This reverts commit 478bb3f661621c38ac0b9bb21389cc5b225c318d.

Fixes: https://tracker.ceph.com/issues/45255
Signed-off-by: Kefu Chai <kchai@redhat.com>
teuthology/orchestra/remote.py

index aa57b8ed28fe6d0ddab65a38024a04320f434c82..8bb02f22dc05adb97a5b02150a7f77b76bd27e14 100644 (file)
@@ -165,7 +165,7 @@ class Remote(object):
         if self.ssh.get_transport() is None:
             return False
         try:
-            self._runner(args="true", client=self.ssh, name=self.shortname)
+            self.run(args="true")
         except Exception:
             return False
         return self.ssh.get_transport().is_active()
@@ -199,7 +199,10 @@ class Remote(object):
 
         TODO refactor to move run.run here?
         """
-        self.ensure_online()
+        if not self.ssh or \
+           not self.ssh.get_transport() or \
+           not self.ssh.get_transport().is_active():
+            self.reconnect()
         r = self._runner(client=self.ssh, name=self.shortname, **kwargs)
         r.remote = self
         return r