fedora-iot / greenboot

Generic Health Checking Framework for systemd
GNU Lesser General Public License v2.1
101 stars 29 forks source link

compatibility for bootc image #146

Closed say-paul closed 3 months ago

say-paul commented 3 months ago

This enables greenboot to work with bootc image alongside supporting ostree based image. Its achieved by:

  1. Support is added for greenboot to work with read-only /boot. It uses PrivateMounts=yes to isolate the system and remounts boot as rw followed by setting the grub variable as per healthcheck.

    The following services are affected:

    • greenboot-grub2-set-success.service
    • greenboot-grub2-set-counter.service
    • greenboot-rpm-ostree-check-fallback.service

    The grub2-editenv command is decoupled from greenboot-grub2-set-success.service and is part of a separate script.

    fixes: #136 .

  2. Auto-detecting the the image type: ostree/bootc and applying the correct rollback verb to rollback to last known stable version.

    fixes: #135

hexfusion commented 3 months ago

Thanks, I was just recently seeing this.

Aug 21 12:58:07 localhost.localdomain systemd[1]: Starting Set grub2 boot counter in preparation of upgrade...
Aug 21 12:58:07 localhost.localdomain systemd[1]: Starting Hold /boot Open for OSTree Finalize Staged Deployment...
Aug 21 12:58:07 localhost.localdomain systemd[1]: Started Hold /boot Open for OSTree Finalize Staged Deployment.
Aug 21 12:58:07 localhost.localdomain greenboot-grub2-set-counter[1668]: grub2-editenv: error: cannot open `/boot/grub2/grubenv': Read-only file system.