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

Change default root password #2055

Merged
merged 4 commits into from
May 2, 2024

Conversation

davidcassany
Copy link
Contributor

No description provided.

@davidcassany davidcassany requested a review from a team as a code owner April 23, 2024 09:09
@@ -137,9 +137,9 @@ func (s *SUT) ChangeBoot(b string) error {

switch b {
case Active:
bootEntry = Cos
bootEntry = "active"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just addressing some old leftovers

case Passive:
bootEntry = "fallback"
bootEntry = "1"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

same as above, just addressing some old leftovers

@davidcassany davidcassany enabled auto-merge (rebase) April 23, 2024 09:11
frelon
frelon previously approved these changes Apr 23, 2024
Copy link
Contributor

@frelon frelon left a comment

Choose a reason for hiding this comment

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

Nice!

@@ -14,4 +14,4 @@ stages:
entity: |
kind: "shadow"
username: "root"
password: "cos"
password: "elemental"
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

@davidcassany
Copy link
Contributor Author

OK, just realized this requires some more love, if the password changes across versions the test suite will also fail. I think the proper solution is once an for all setting the authorized ssh keys as part of the cloud config in tests, this way we could eventually connect without needing a password at all.

@davidcassany davidcassany marked this pull request as draft April 30, 2024 15:43
@davidcassany davidcassany force-pushed the new_default_password branch 4 times, most recently from 9490b7b to 44bca09 Compare May 2, 2024 07:23
@davidcassany davidcassany marked this pull request as ready for review May 2, 2024 08:48
@@ -13,7 +13,7 @@ endif

.PHONY: test-active
test-active: prepare-test
VM_PID=$$(scripts/run_vm.sh vmpid) go run $(GINKGO) $(GINKGO_ARGS) ./tests/wait-active
VM_PID=$$(scripts/run_vm.sh vmpid) COS_PASS=cos go run $(GINKGO) $(GINKGO_ARGS) ./tests/wait-active
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The upgrade test requires the legacy password because it boots with an older disk, so the password needs to be added for test-active and test-upgrade. It always tries to login by the authorized key first and if not it fallbacks to the password method.

I could not find an easy way at ssh package level to set multiple passwords to try.

@davidcassany davidcassany dismissed frelon’s stale review May 2, 2024 10:26

Changed meanwhile

Copy link
Contributor

@frelon frelon left a comment

Choose a reason for hiding this comment

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

Awesome!

@davidcassany davidcassany merged commit 6f0b28e into rancher:main May 2, 2024
16 of 17 checks passed
@davidcassany davidcassany deleted the new_default_password branch May 2, 2024 12:29
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.

3 participants