From c697f224131d8f81a0920b745c99f51363cd019f Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Tue, 14 Jul 2020 13:13:13 +1000 Subject: [PATCH] run-base : don't strip root ssh private key Builds running on the new container-based executors started failing to connect to remote hosts with Load key "/root/.ssh/id_rsa": invalid format It turns out the new executor is writing keys in OpenSSH format, rather than the older PEM format. And it seems that the OpenSSH format is more picky about having a trailing space after the -----END OPENSSH PRIVATE KEY----- bit of the id_rsa file. By default, the file lookup runs an rstrip on the incoming file to remove the trailing space. Turn that off so we generate a valid key. Change-Id: I49bb255f359bd595e1b88eda890d04cb18205b6e --- playbooks/zuul/run-base.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/zuul/run-base.yaml b/playbooks/zuul/run-base.yaml index a7da3d5773..40f0c3f381 100644 --- a/playbooks/zuul/run-base.yaml +++ b/playbooks/zuul/run-base.yaml @@ -1,6 +1,6 @@ - import_playbook: ../install-ansible.yaml vars: - root_rsa_key: "{{ lookup('file', zuul.executor.work_root + '/' + zuul.build + '_id_rsa') }}" + root_rsa_key: "{{ lookup('file', zuul.executor.work_root + '/' + zuul.build + '_id_rsa', rstrip=False) }}" ansible_cron_disable_job: true cloud_launcher_disable_job: true