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

Refactor stages.Init() code path #2065

Merged

Conversation

Chris-Peterson444
Copy link
Contributor

@Chris-Peterson444 Chris-Peterson444 commented Aug 23, 2024

Requires #2026. New changes for this PR are the last four commits. #2026 now part of main. All commits are for this PR.

I pulled out the stages.Init() path from the server code and moved it to a helper script in system_scripts. The idea is that we can call this script and parse the output from it for the same information. It currently prints yaml to stdout, which seems robust enough for the kind of data it returns.

I tested this with the Focal release ISO, the 20.04.1 ISO, and the 22.04.1 ISO, all of which would rely on this code path. I tested by:

  • passing no cloud-config
  • passing cloud-config with autoinstall
  • passing cloud-config without autoinstall
  • ensuring the ssh login information was correct on the help screen

All scenarios worked as expected.

subiquity/cloudinit.py Outdated Show resolved Hide resolved
subiquitycore/tests/test_utils.py Outdated Show resolved Hide resolved
Replace the legacy stages.Init() code path with a helper function
to call the system_scripts extraction script and get the necessary
data (cloud-config + installer_user_name) from there.
@Chris-Peterson444 Chris-Peterson444 merged commit 1d0378d into canonical:main Aug 29, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants