-
Notifications
You must be signed in to change notification settings - Fork 112
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
Conversation
Fixes #3374 Signed-off-by: Dimitris Karakasilis <[email protected]>
d3b0189
to
2d62df3
Compare
tests/upgrade_cli_test.go
Outdated
@@ -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 -") |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this 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]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very nice!
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 #