From: Kefu Chai Date: Mon, 11 May 2020 13:26:13 +0000 (+0800) Subject: Revert "orchestra/remote.py: use ensure_online() helper in run()" X-Git-Tag: 1.1.0~119^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1469%2Fhead;p=teuthology.git Revert "orchestra/remote.py: use ensure_online() helper in run()" This reverts commit 478bb3f661621c38ac0b9bb21389cc5b225c318d. Fixes: https://tracker.ceph.com/issues/45255 Signed-off-by: Kefu Chai --- diff --git a/teuthology/orchestra/remote.py b/teuthology/orchestra/remote.py index aa57b8ed28..8bb02f22dc 100644 --- a/teuthology/orchestra/remote.py +++ b/teuthology/orchestra/remote.py @@ -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