reboot-boot-verify skips a valid marker on RTC-less Pis (clock behind at boot) #26

Open
opened 2026-11-12 16:47:31 +00:00 by ginjiruu · 0 comments
Owner

pi-01, 2026-11-12: after kured rebooted it onto the #25 kernel, reboot-boot-verify logged

reboot-boot-verify: marker armed during this boot, no reboot to verify yet; skipping

but the marker (/var/lib/reboot-marker/pending, marked-at: 2026-11-12T15:58:33Z, switched-generation nk85pjyb...) was armed before the reboot (~15:59). booted-system == switched-generation, so the reboot it asks for already happened and verify should have passed and cleared it.

Likely cause: the Pis have no RTC. Early in boot the clock is behind until NTP steps it (known: pi-04 2026-11-03, modules/reboot-marker.nix already uses /proc/uptime for its own deadlines), so comparing marked-at with the boot time says "armed during this boot".

Effect today: harmless (no sentinel, no reboot loop) but the marker is never cleared, and a stale marker can confuse the next deploy.

Fix idea: decide "armed during this boot" by boot_id (store /proc/sys/kernel/random/boot_id in the marker when arming) instead of timestamps. pi-02..04 passed the same reboot window, so it is a race, not systematic.

pi-01, 2026-11-12: after kured rebooted it onto the #25 kernel, `reboot-boot-verify` logged ``` reboot-boot-verify: marker armed during this boot, no reboot to verify yet; skipping ``` but the marker (`/var/lib/reboot-marker/pending`, `marked-at: 2026-11-12T15:58:33Z`, switched-generation nk85pjyb...) was armed **before** the reboot (~15:59). booted-system == switched-generation, so the reboot it asks for already happened and verify should have passed and cleared it. Likely cause: the Pis have no RTC. Early in boot the clock is behind until NTP steps it (known: pi-04 2026-11-03, modules/reboot-marker.nix already uses /proc/uptime for its own deadlines), so comparing `marked-at` with the boot time says "armed during this boot". Effect today: harmless (no sentinel, no reboot loop) but the marker is never cleared, and a stale marker can confuse the next deploy. Fix idea: decide "armed during this boot" by boot_id (store `/proc/sys/kernel/random/boot_id` in the marker when arming) instead of timestamps. pi-02..04 passed the same reboot window, so it is a race, not systematic.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lab/machine-configs#26
No description provided.