Skip to content

Check that the ssh host fingerprint hasn't changed after upgrade #3498

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

Merged
merged 3 commits into from
Jul 1, 2025

Conversation

jimmykarily
Copy link
Contributor

Fixes #3374

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

@jimmykarily jimmykarily force-pushed the 3374-test-ssh-host-fingerprint branch from d3b0189 to 2d62df3 Compare June 30, 2025 13:15
@jimmykarily jimmykarily marked this pull request as ready for review June 30, 2025 13:41
@jimmykarily jimmykarily requested a review from a team June 30, 2025 13:41
@jimmykarily jimmykarily moved this from In Progress 🏃 to Under review 🔍 in 🧙Issue tracking board Jun 30, 2025
@@ -70,6 +78,18 @@ var _ = Describe("k3s upgrade manual test", Label("upgrade-with-cli"), func() {
return err
}, 10*time.Minute, 10*time.Second).ShouldNot(HaveOccurred())

// Get SSH host key fingerprint after upgrade
By("Getting SSH host key fingerprint after upgrade")
postUpgradeFingerprint, err := vm.Sudo("cat /etc/ssh/ssh_host_*.pub 2>/dev/null | ssh-keygen -lf -")
Copy link
Member

Choose a reason for hiding this comment

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

I know the go way is very verbose, but I wouldn't mind if this was a shared function accross these test files. Not bloking the pr

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, let me give it a shot.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok pushed, let's see if I broke it :D

Copy link
Member

@mauromorales mauromorales left a comment

Choose a reason for hiding this comment

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

nitpic, other than that lgtm

Signed-off-by: Dimitris Karakasilis <[email protected]>
otherwise it's nil

Signed-off-by: Dimitris Karakasilis <[email protected]>
Copy link
Member

@Itxaka Itxaka left a comment

Choose a reason for hiding this comment

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

very nice!

@jimmykarily jimmykarily merged commit 3c46793 into master Jul 1, 2025
53 checks passed
@jimmykarily jimmykarily deleted the 3374-test-ssh-host-fingerprint branch July 1, 2025 10:42
@github-project-automation github-project-automation bot moved this from Under review 🔍 to Done ✅ in 🧙Issue tracking board Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

feat: test that ssh host fingerprint does not change during upgrades
3 participants