From: Dan Mick Date: Tue, 13 Jan 2015 23:15:09 +0000 (-0800) Subject: internal.vm_setup: call ssh with -o StrictHostKeyChecking=no X-Git-Tag: 1.1.0~1045^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F403%2Fhead;p=teuthology.git internal.vm_setup: call ssh with -o StrictHostKeyChecking=no If one doesn't have this configured for ssh, the call to ssh for vps'es in vm_setup will cause a tty prompt to accept the unknown key. Fixes: #10530 Signed-off-by: Dan Mick --- diff --git a/teuthology/task/internal.py b/teuthology/task/internal.py index 6a6a0803c..2f50902f9 100644 --- a/teuthology/task/internal.py +++ b/teuthology/task/internal.py @@ -609,7 +609,17 @@ def vm_setup(ctx, config): check_status=False,) if r.returncode != 0: p1 = subprocess.Popen(['cat', editinfo], stdout=subprocess.PIPE) - p2 = subprocess.Popen(['ssh', '-t', '-t', str(rem), 'sudo', 'sh'], stdin=p1.stdout, stdout=subprocess.PIPE) + p2 = subprocess.Popen( + [ + 'ssh', + '-o', 'StrictHostKeyChecking=no', + '-t', '-t', + str(rem), + 'sudo', + 'sh' + ], + stdin=p1.stdout, stdout=subprocess.PIPE + ) _, err = p2.communicate() if err: log.info("Edit of /etc/sudoers failed: %s", err)