Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ansible: remove old github.com ssh key from known_hosts #3256

Merged
merged 1 commit into from Mar 29, 2023

Conversation

richardlau
Copy link
Member

Refs: https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/
Refs: #3254


This is untested. I won't be in a position to run a playbook until Tuesday.

@targos
Copy link
Member

targos commented Mar 25, 2023

Tested with:

$ ansible-playbook --limit test-digitalocean-fedora32-x64-1 ansible/playbooks/jenkins/worker/create.yml --step --start-at-task="remove old github.com ssh keys"

PLAY [test,release,!*-win*] ********************************************************************************************
Perform task: TASK: jenkins-worker : remove old github.com ssh keys (N)o/(y)es/(c)ontinue: y

Perform task: TASK: jenkins-worker : remove old github.com ssh keys (N)o/(y)es/(c)ontinue: *****************************

TASK [jenkins-worker : remove old github.com ssh keys] *****************************************************************
changed: [test-digitalocean-fedora32-x64-1] => (item=ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==)

It seems to have worked fine!

@targos
Copy link
Member

targos commented Mar 25, 2023

Just ran it on all (available) hosts

@mhdawson
Copy link
Member

@targos did that include running on the docker maines along the linst of #3254 (comment)?

Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM since it worked :)

@targos
Copy link
Member

targos commented Mar 25, 2023

@mhdawson

did that include running on the docker maines along the linst of #3254 (comment)?

No, I wasn't aware of that command and just spent some time updating a lot of docker containers manually...

@targos
Copy link
Member

targos commented Mar 25, 2023

ansible-playbook ansible/playbooks/jenkins/docker-host.yaml --step --start-at-task="remove old github.com ssh keys"

PLAY [test,release] ***********************************************************************************************************************************************************************************************************************

PLAY RECAP ********************************************************************************************************************************************************************************************************************************

 [ERROR]: No matching task "remove old github.com ssh keys" found. Note: --start-at-task can only follow static includes.

@mhdawson
Copy link
Member

@targos thanks for taking the time/effort to do the manual updates, have you done them all? If not maybe we can split up the remaining ones?

@mhdawson
Copy link
Member

mhdawson commented Mar 25, 2023

@targos I'm not sure we can run just that step in the ansible/playbooks/jenkins/docker-host.yaml as I believe it works differently. I think running it fully would recreate all of the containers etc. I did not try running because I've not run it before and am therefore not that comfortable in how it works. I think @richardlau has run it more recently.

EDIT: should have mentioned that since Richard is out, updating manually in the short term makes sense to me as you have already done/started.

@targos
Copy link
Member

targos commented Mar 25, 2023

@mhdawson I don't know what are the remaining ones :)

I started a new CI job here to monitor: https://ci.nodejs.org/job/node-test-pull-request/50600/ and updated test-digitalocean-ubuntu1804-x64-1
I'm going to stop for today, feel free to watch the results.

@mhdawson
Copy link
Member

@targos thanks for all of your hard work.

@mhdawson
Copy link
Member

Fixed up a few more hosts as mentioned in #3254

@mhdawson
Copy link
Member

Resumed @targos build here to see if there are more hosts that will fail - https://ci.nodejs.org/job/node-test-pull-request/50601/

@MoLow
Copy link
Member

MoLow commented Mar 25, 2023

@MoLow
Copy link
Member

MoLow commented Mar 25, 2023

I am rerunning ansible-playbook ansible/playbooks/jenkins/docker-host.yaml --limit "test-softlayer-ubuntu1804_docker-x64-1" -vv with this branch checked out, I will resume the build once completed

@MoLow

This comment was marked as resolved.

@MoLow
Copy link
Member

MoLow commented Mar 25, 2023

@MoLow
Copy link
Member

MoLow commented Mar 25, 2023

@richardlau
Copy link
Member Author

didn't seem to help: https://ci.nodejs.org/job/node-test-commit-linux-containered/36771/nodes=ubi81_sharedlibs_openssl111fips_x64/ what am I missing?

See #3254 (comment) -- the containers are set up through a different set of Ansible tasks. I'm going to merge this PR and then work on a follow up to move the known_hosts for GitHub tasks to it's own role that will be called from both the jenkins-worker/create playbook and the docker-host playbook.

@richardlau richardlau merged commit ddf79d5 into nodejs:main Mar 29, 2023
1 check passed
richardlau added a commit that referenced this pull request Apr 17, 2023
Refactor the Ansible tasks for updating the `known_hosts` file for
github.com into its own role. Call that role from both the docker-host
and jenkins-worker/create playbooks.

Fixes: #3254
Refs: #3212
Refs: #3256
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants