]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Don't call Remote.connect() in Remote.__init__()
authorZack Cerza <zack@redhat.com>
Wed, 15 Apr 2015 18:31:08 +0000 (12:31 -0600)
committerZack Cerza <zack@redhat.com>
Thu, 23 Apr 2015 16:13:45 +0000 (10:13 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/orchestra/remote.py
teuthology/task/internal.py

index 99c212ac822b996e33bd566b7846cb526f8f57ba..224044fca0e7ef1d4369d5375a2bb7d0bc7e72ff 100644 (file)
@@ -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,
index dff1c050ce5e9769be3fd6e3eed43443a98d1db0..26286aa5c6d4559ce40d5579e647e1c37b3058ce 100644 (file)
@@ -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']):