Bug 2312453

Summary: Incorrect check for static configs with bootupd leads to no /boot/loader/grub.cfg after reboot
Product: [Fedora] Fedora Reporter: Timothée Ravier <travier>
Component: ostreeAssignee: Timothée Ravier <travier>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: 41CC: amurdaca, coreos-sig, dustymabe, jmarrero, jonathan, jvanderwaa, lucab, miabbott, mmarusak, mpitt, pwhalen, travier, walters
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: ostree-2024.7-3.fc42 ostree-2024.7-3.fc41 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-09-16 19:08:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2150982    

Description Timothée Ravier 2024-09-15 16:43:03 UTC
https://github.com/ostreedev/ostree/pull/3205 added a check that looks for `"static-configs"` in bootupd state file: `/boot/bootupd-state.json`.

Unfortunately, bootup will always write this entry (even if null) since https://github.com/coreos/bootupd/pull/609.

Thus old systems that are still using dynamic GRUB configs and that are updated with bootupd will stop generating GRUB configs and will thus fail to boot.

See initial report: https://github.com/fedora-silverblue/issue-tracker/issues/595
Ostree upstream issue: https://github.com/ostreedev/ostree/issues/3295
Pull request: https://github.com/ostreedev/ostree/pull/3300

Reproducible: Always

Steps to Reproduce:
1. Install Fedora Atomic 40
2. Rebase to Fedora Atomic 41
3. Update the bootloader using `bootupctl update`
4. Create a new deployment, for example by installing a package: `rpm-ostree install strace`
5. Finalize the staged ostree deployment early (normally happens on shutdown): `ostree admin finalize-staged`
Actual Results:  
No GRUB config in `/boot/loader/grub.cfg`

Expected Results:  
GRUB config in `/boot/loader/grub.cfg`

Comment 1 Timothée Ravier 2024-09-15 16:45:52 UTC
Sorry, incorrectly filed that for cockpit-ostree by mistake.

Comment 2 Timothée Ravier 2024-09-15 16:56:59 UTC
https://src.fedoraproject.org/rpms/ostree/pull-request/39

Comment 3 Fedora Update System 2024-09-16 14:14:31 UTC
FEDORA-2024-99cef23966 (ostree-2024.7-3.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-99cef23966

Comment 4 Fedora Update System 2024-09-16 14:27:09 UTC
FEDORA-2024-3945fdf385 (ostree-2024.7-3.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-3945fdf385

Comment 5 Fedora Update System 2024-09-16 19:08:22 UTC
FEDORA-2024-99cef23966 (ostree-2024.7-3.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 6 Fedora Update System 2024-09-17 03:07:58 UTC
FEDORA-2024-3945fdf385 has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-3945fdf385`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-3945fdf385

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2024-09-18 01:54:39 UTC
FEDORA-2024-3945fdf385 (ostree-2024.7-3.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.