From: Zack Cerza Date: Wed, 15 Apr 2015 18:31:08 +0000 (-0600) Subject: Don't call Remote.connect() in Remote.__init__() X-Git-Tag: 1.1.0~964^2~3 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=0a2feb9c0c4e47aa0fcfde86ce2dd665d80f7173;p=teuthology.git Don't call Remote.connect() in Remote.__init__() Signed-off-by: Zack Cerza --- 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']):