bottlerocket-os / bottlerocket-os/bottlerocket-settings-sdk
Add `kernel_parameter_order` optional field to `BootSettingsV1`
- Dominant language
- Rust
- Stars
- 5
- Forks
- 36
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 2
Description
## Background
Related to [bottlerocket-os/bottlerocket#3647](https://github.com/bottlerocket-os/bottlerocket/issues/3647).
Kernel command line argument order can matter (e.g. `hugepagesz` must precede `hugepages`), but `kernel_parameters` is a `HashMap` and the datastore loses ordering through filesystem storage, so there's no way to guarantee output order today.
## Proposed Solution
Rather than changing the datastore to preserve map ordering, I'd like to propose adding an optional field to `BootSettingsV1`:
```rust
kernel_parameter_order: Option>,
```
`prairiedog` would use this to output parameters in the specified order first, then append the rest. If absent, behavior is unchanged.
```toml
[settings.boot]
kernel-parameter-order = ["hugepagesz", "hugepages"]
[settings.boot.kernel-parameters]
hugepagesz = ["1G"]
hugepages = ["4"]
```
For more details on the investigation and proposed approach, see [my comment on the original issue](https://github.com/bottlerocket-os/bottlerocket/issues/3647#issuecomment-3963288161).
Once this field is available, I'll submit PRs for the prairiedog logic in `bottlerocket-core-kit` and the version bump in `bottlerocket`.
Contributor guide
Research direction
Start by locating the BootSettingsV1 definition and its serialization or settings-schema entry points in this Rust SDK. Trace how the optional field would be represented, then verify that the documented settings.boot TOML shape maps to it; done means the field is available without changing behavior when absent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100