]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
added UserKnownHostsfile to ssh config
authortamil <tamil.muthamizhan@inktank.com>
Thu, 16 May 2013 16:49:40 +0000 (09:49 -0700)
committertamil <tamil.muthamizhan@inktank.com>
Thu, 16 May 2013 16:49:40 +0000 (09:49 -0700)
Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
teuthology/task/ssh_keys.py

index 94b43f823fbed5eb462e75caa5cc6c5b4f99a43a..dd04ac1ebcb6eee3f4849c3788e817a7f47b1dca 100644 (file)
@@ -8,7 +8,6 @@ from cStringIO import StringIO
 from teuthology import contextutil
 import teuthology.misc as misc
 from ..orchestra import run
-from ..orchestra.connection import create_key
 
 log = logging.getLogger(__name__)
 ssh_keys_user = 'ssh-keys-user'
@@ -71,9 +70,15 @@ def tweak_ssh_config(ctx, config):
     run.wait(
         ctx.cluster.run(
             args=[
-                'echo', 
-                'StrictHostKeyChecking no\n', 
-                run.Raw('>'), 
+                'echo',
+                'StrictHostKeyChecking no\n',
+                run.Raw('>'),
+                run.Raw('/home/ubuntu/.ssh/config'),
+                run.Raw('&&'),
+                'echo',
+                'UserKnownHostsFile ',
+                run.Raw('/dev/null'),
+                run.Raw('>>'),
                 run.Raw('/home/ubuntu/.ssh/config'),
             ],
             wait=False,
@@ -164,9 +169,9 @@ def task(ctx, config):
     pre_run_cleanup_keys(ctx)
 
     with contextutil.nested(
+        lambda: tweak_ssh_config(ctx, config),
         lambda: push_keys_to_host(ctx, config, public_key_string, private_key_string),
-        lambda: tweak_ssh_config(ctx, config),   
-
+        #lambda: tweak_ssh_config(ctx, config),
         ):
         yield