]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Connect without using any known_hosts files.
authorJosh Durgin <josh.durgin@dreamhost.com>
Fri, 15 Jul 2011 22:04:08 +0000 (15:04 -0700)
committerJosh Durgin <josh.durgin@dreamhost.com>
Wed, 20 Jul 2011 00:13:13 +0000 (17:13 -0700)
teuthology/task/internal.py
teuthology/task/kernel.py

index cf4e9f44ad3b21a779443f34450cc421e85e8892..b44e4d293d78ba6528fe68ee6856a3aa7267d98c 100644 (file)
@@ -97,7 +97,8 @@ def connect(ctx, config):
     from orchestra import connection, remote
     import orchestra.cluster
 
-    remotes = [remote.Remote(name=t, ssh=connection.connect(t))
+    remotes = [remote.Remote(name=t,
+                             ssh=connection.connect(user_at_host=t, host_key=key))
                for t, key in ctx.config['targets'].iteritems()]
     ctx.cluster = orchestra.cluster.Cluster()
     if 'roles' in ctx.config:
index df0ccba4c7967243e0bd3011bd768743b51ebf89..d4788cf676e1a7a0e2f49e898672bc7de68637ba 100644 (file)
@@ -143,7 +143,10 @@ def reconnect(ctx, timeout):
     while True:
         for remote in list(need_reconnect):
             try:
-                remote.ssh = connection.connect(remote.name)
+                remote.ssh = connection.connect(
+                    user_at_host=remote.name,
+                    host_key=ctx.config['targets'][remote.name],
+                    )
             except socket.error as (code, description):
                 if code not in [errno.ECONNREFUSED, errno.ETIMEDOUT,
                                 errno.EHOSTUNREACH, errno.EHOSTDOWN] or \