Skip to content

add fallback to greenboot#181

Open
say-paul wants to merge 4 commits intofedora-iot:mainfrom
say-paul:add-fallback
Open

add fallback to greenboot#181
say-paul wants to merge 4 commits intofedora-iot:mainfrom
say-paul:add-fallback

Conversation

@say-paul
Copy link
Copy Markdown
Member

@say-paul say-paul commented May 6, 2026

fixes - #180

say-paul and others added 2 commits May 6, 2026 13:57
Set fallback=1 alongside greenboot_rollback_trigger when an OS update
is detected, enabling GRUB to boot the previous deployment if the new
kernel panics. Disarm fallback at the start of healthcheck since
reaching systemd means the kernel booted successfully.

Closes: fedora-iot#180
Co-authored-by: Cursor <cursoragent@cursor.com>
DRY up get_fallback_at and get_rollback_trigger_at into a shared
get_grub_bool_var helper. Fix unset_grub_var context message that was
hardcoded to "boot_counter" for all keys.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gemini-code-assist
Copy link
Copy Markdown

Important

Installation incomplete: to start using Gemini Code Assist, please ask the organization owner(s) to visit the Gemini Code Assist Admin Console and sign the Terms of Services.

@say-paul say-paul marked this pull request as draft May 6, 2026 09:41
Change greenboot-set-rollback-trigger.service to run when bootc update
or rpm-ostree upgrade stages a deployment, instead of at next boot.

The service is now RequiredBy=ostree-finalize-staged.service and ordered
Before= it, matching the pattern used by the original bash greenboot's
greenboot-grub2-set-counter.service. This means the rollback trigger
and fallback grub variables are set immediately when an update is
staged, not deferred to the next boot.

Removed: ConditionNeedsUpdate, boot-time ordering (sysinit.target,
systemd-update-done.service), WantedBy boot targets.
Added: ConditionPathExists=/run/ostree-booted, RequiresMountsFor=/boot,
PrivateMounts=yes, RemainAfterExit=yes.

Co-authored-by: Cursor <cursoragent@cursor.com>
@say-paul say-paul marked this pull request as ready for review May 6, 2026 11:14
@gemini-code-assist
Copy link
Copy Markdown

Important

Installation incomplete: to start using Gemini Code Assist, please ask the organization owner(s) to visit the Gemini Code Assist Admin Console and sign the Terms of Services.

@say-paul say-paul force-pushed the add-fallback branch 2 times, most recently from 2af74e3 to 3be77be Compare May 6, 2026 18:54
Healthcheck no longer directly triggers boot-complete.target. Instead:
healthcheck passes -> OnSuccess activates greenboot-success.target ->
success target Requires=boot-complete.target.

This ensures boot-complete.target is only reached through the greenboot
success chain, and greenboot-success.target has no [Install] section.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant