-
Notifications
You must be signed in to change notification settings - Fork 524
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
models, sundog, prairiedog: add kernel boot config support #2029
Conversation
7ccdaea
to
f7ec398
Compare
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.
Nice
sources/api/migration/migrations/v1.8.0/boot-setting-metadata/src/main.rs
Show resolved
Hide resolved
Push above and below addresses @webern 's comments. |
5da3a56
to
7b67162
Compare
Push above and below limits boot settings to bare metal variants only. |
I need to figure out conditional compilation for certain parts of prairiedog that deals with boot settings that only exist for metal variants. |
Push above add conditional compilation for boot config related functionalities in prairedog. |
Push above and below and tries to address comments. Unit tests all pass. |
8ec1969
to
974e101
Compare
Push above simplifies padding calculation a bit and addresses some leftover comments. |
Push above rebases onto develop to pull the grub changes. |
Push above removes some extraneous comments and fixes a log message that was causing sundog to choke. |
Push above addresses @bcressey comments.
Tested all the changes and they still work as expected:
|
Push above does some minor refactoring and clean-up |
4d999cb
to
1743393
Compare
Push above fixes initrd generation that I missed in my initial testing. |
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.
Looks good to me except for some fussing about single- and double quotes.
This adds `settings.boot` to help configure kernel boot config settings.
- Adds new subcommand `generate-boot-config` to generate an initrd image file with boot config contents populated from Bottlerocket boot settings. - Adds new subcommand `generate-boot-settings` to generate bottlerocket settings from kernel's bootconfig file at `/proc/bootconfig` Moves prairiedog from `sources/prairiedog` to `sources/api/prairiedog` now that it needs to query from the Bottlerocket API and need settings model information.
This updates the settings retrieval to use prefixes for matching and querying. We cannot use full keys for matching because we now have settings generator for keys that map to top level structs that encompasses multiple settings.
Add settings generator for `settings.boot` and restart commands for when boot settings change.
We've added bootconfig support so console settings should be specified through there. The console settings specified to the kernel commandline will always take effect, so we're removing them from the variant metadata.
Pushes above addresses @bcressey 's comments.
|
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.
Nice!
👢 🔧
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.
🐙
Nice work!
Issue number:
N/A
Description of changes:
Testing done:
Launched instance with the following user-data:
Prairiedog successfully generates the initrd image file containing boot config:
Verified that it's a valid initrd image file with valid boot config content with the linux kernel's
bootconfig
tool:Built a
metal-dev
image anddd
'd it to a baremetal server's/dev/sda
.I manually provisioned a bootconfig.data file that contained the following bootconfig:
and copied it into the
BOTTLEROCKET-PRIVATE
partition.Then I booted the baremetal host from its harddrive.
Connected to the server's serial port over IP and saw that the host comes up successfully.
Checked settings and it's generated correctly from
/proc/bootconfig
:If I check systemd, the log-level is correctly set to "debug"
If I change the settings,
/var/lib/bottlerocket/bootconfig.data
gets updated as expected:If I reboot, I can see that the systemd log-level gets updated to
info
as expected.Built a
metal-dev
image anddd
'd it to a baremetal server's/dev/sda
.I manually provisioned a user-data.toml file that looks like this:
and copied it into the
BOTTLEROCKET-PRIVATE
partition.Then I booted the baremetal host from its harddrive and everything comes up fine.
The generated bootconfig.data file is as expected:
If I reboot the host, then the bootconfig above gets loaded by the kernel as expected.
Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.