-
Notifications
You must be signed in to change notification settings - Fork 297
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
bootloader/grub2: Handle empty static configs #3300
Conversation
Skipping CI for Draft Pull Request. |
Still test / investigating if this is really the issue. |
CI fixes in #3301 |
@@ -30,6 +30,7 @@ | |||
#define BOOTUPD_CONFIG "boot/bootupd-state.json" | |||
// Horrible hack, to avoid including a JSON parser we just grep for this | |||
#define BOOTUPD_CONFIG_STATIC_JSON_FRAGMENT "\"static-configs\"" | |||
#define BOOTUPD_CONFIG_STATIC_JSON_FRAGMENT_NULL "\"static-configs\":null" |
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.
Ouch 😢
I dunno, maybe overdue for us to link in a json library, I had just hoped to do that with rust (that's in #3054 but nontrivial)
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.
Yeah, I agree it's really not great :/
In ostreedev#3205, we introduced a check to skip re-generating the GRUB config if we detect that static configs are in used by looking at bootupd's state. Unfortunately this check is incomplete and does not account for present but null entries in the JSON state file. A proper fix would be to parse the JSON but this requires a larger code change. Fixes: ostreedev#3295 Fixes: ostreedev#3205
e339625
to
508a8b6
Compare
This is working from initial testing. |
Just stumbled on this bug with EL 9.4, is it already planned for backport to EL 9.4 (or 9.5) or should I open an issue/case ? |
In #3205, we introduced a check to skip re-generating the GRUB config if we detect that static configs are in used by looking at bootupd's state.
Unfortunately this check is incomplete and does not account for present but null entries in the JSON state file.
A proper fix would be to parse the JSON but this requires a larger code change.
Fixes: #3295
Fixes: #3205