get_host_status: also return the running and the newest installed kernel #59

Open
opened 2026-10-30 10:39:20 +00:00 by christianmanivong · 0 comments
Owner

Prio: P4 — neither important nor urgent (the reboot flag and its reason already work; this adds detail).

HostStatusMixin.get_host_status() returns reboot_required and a reason string. parse_host_status already reads uname -r ([kernel]) and /lib/modules ([modules]) to decide "a newer kernel of the running flavour is installed" — and throws both away.

netOrk's graph source source.reboot_required (NetOrk/netork#1697) would like to show which kernel runs and which newest one is installed, without a second command (get_facts() is ~8 SSH commands, too heavy for a sample every minute) and without parsing the English reason text.

Proposal: add optional running_kernel: str | None and newest_kernel: str | None to HostStatusDict, filled from the sections parse_host_status already has; drivers that override get_host_status (e.g. OPNsense) leave them None. netOrk then bumps the pin and exposes them as outputs.

Prio: P4 — neither important nor urgent (the reboot flag and its reason already work; this adds detail). `HostStatusMixin.get_host_status()` returns `reboot_required` and a reason string. `parse_host_status` already reads `uname -r` (`[kernel]`) and `/lib/modules` (`[modules]`) to decide "a newer kernel of the running flavour is installed" — and throws both away. netOrk's graph source `source.reboot_required` (NetOrk/netork#1697) would like to show **which** kernel runs and which newest one is installed, without a second command (`get_facts()` is ~8 SSH commands, too heavy for a sample every minute) and without parsing the English reason text. **Proposal:** add optional `running_kernel: str | None` and `newest_kernel: str | None` to `HostStatusDict`, filled from the sections `parse_host_status` already has; drivers that override `get_host_status` (e.g. OPNsense) leave them `None`. netOrk then bumps the pin and exposes them as outputs.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NAPALM/napalm-device-types#59