From 0a2feb9c0c4e47aa0fcfde86ce2dd665d80f7173 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Wed, 15 Apr 2015 12:31:08 -0600 Subject: [PATCH] Don't call Remote.connect() in Remote.__init__() Signed-off-by: Zack Cerza --- teuthology/orchestra/remote.py | 2 +- teuthology/task/internal.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/teuthology/orchestra/remote.py b/teuthology/orchestra/remote.py index 99c212ac82..224044fca0 100644 --- a/teuthology/orchestra/remote.py +++ b/teuthology/orchestra/remote.py @@ -51,7 +51,7 @@ class Remote(object): self._host_key = host_key self.keep_alive = keep_alive self.console = console - self.ssh = ssh or self.connect() + self.ssh = ssh def connect(self): self.ssh = connection.connect(user_at_host=self.name, diff --git a/teuthology/task/internal.py b/teuthology/task/internal.py index dff1c050ce..26286aa5c6 100644 --- a/teuthology/task/internal.py +++ b/teuthology/task/internal.py @@ -280,8 +280,9 @@ def connect(ctx, config): key = None except (AttributeError, KeyError): pass - remotes.append( - remote.Remote(name=t, host_key=key, keep_alive=True, console=None)) + rem = remote.Remote(name=t, host_key=key, keep_alive=True) + rem.connect() + remotes.append(rem) ctx.cluster = cluster.Cluster() if 'roles' in ctx.config: for rem, roles in zip(remotes, ctx.config['roles']): -- 2.39.5