From 4f6b69b0786425b685484e0f77c300d545bd59e1 Mon Sep 17 00:00:00 2001 From: Dan Mick Date: Tue, 13 Jan 2015 15:15:09 -0800 Subject: [PATCH] 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 --- teuthology/task/internal.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/teuthology/task/internal.py b/teuthology/task/internal.py index 6a6a0803cc..2f50902f97 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) -- 2.39.5