Skip to content

[WIP] Add BOOT_REASON_HW_WATCHDOG and KUBE_TRANSITION#148

Draft
eriknordmark wants to merge 2 commits into
lf-edge:mainfrom
eriknordmark:hw-watchdog-bootreason
Draft

[WIP] Add BOOT_REASON_HW_WATCHDOG and KUBE_TRANSITION#148
eriknordmark wants to merge 2 commits into
lf-edge:mainfrom
eriknordmark:hw-watchdog-bootreason

Conversation

@eriknordmark

@eriknordmark eriknordmark commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

This is moderately useful on arm64 due to the lack of support in the common Intel iTCO driver.
@rene do you know which hardware watchdog drivers are common on ARM so we can check whether the set bootreason to something other than zero?


Add two values to the BootReason enum in info.proto:

  • BOOT_REASON_HW_WATCHDOG (16) lets a device that was reset by its
    hardware watchdog report that distinctly, instead of being reported as a
    kernel panic (BOOT_REASON_KERNEL) or an unknown reboot. The flag is only
    set on platforms whose watchdog driver reports WDIOF_CARDRESET; many
    (e.g. Intel iTCO) always report a zero boot status, so the value will not
    appear on those.
  • BOOT_REASON_KUBE_TRANSITION (15) already exists in
    pkg/pillar/types.BootReason but was missing from this enum. Adding it
    restores the documented one-to-one correspondence with the pillar values.

Both are additive field numbers, so the change is wire-compatible — existing
controllers and existing EVE instances continue to interoperate.

The pillar code that records and consumes the new reason is in a companion
lf-edge/eve PR.

Commits follow the repo's two-commit convention: the .proto change is
separate from the regenerated Go/Python bindings.

eriknordmark and others added 2 commits June 21, 2026 11:19
Add BOOT_REASON_HW_WATCHDOG (16) so a device reset by its hardware
watchdog can be reported distinctly instead of being guessed as a
kernel panic or unknown reboot. The flag is only set on platforms
whose watchdog driver reports WDIOF_CARDRESET; many (e.g. Intel iTCO)
report a zero boot status, so this value will not appear there.

Also add BOOT_REASON_KUBE_TRANSITION (15), which already exists in
pkg/pillar/types.BootReason but was missing from this enum, restoring
the documented one-to-one correspondence with the pillar values.

Signed-off-by: eriknordmark <erik@zededa.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
No functional changes; generated code and assets only.

Signed-off-by: eriknordmark <erik@zededa.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@eriknordmark eriknordmark changed the title Add BOOT_REASON_HW_WATCHDOG and KUBE_TRANSITION [WIP] Add BOOT_REASON_HW_WATCHDOG and KUBE_TRANSITION Jun 22, 2026
@eriknordmark eriknordmark requested a review from rene June 22, 2026 10:06
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