fix: raise when an update reader cannot read, and report host status #5

Merged
christianmanivong merged 1 commits from feat/host-status into main 2026-10-08 10:15:14 +00:00
Owner

netOrk reads an empty update list as "no updates" and would close every patch clock on the host. Until now these all came back as an empty list:

  • a refused sudo;
  • a failing pkg upgrade -n, syspatch -c, pkg_add -u -n or freebsd-update updatesready;
  • a pkg database that pkg cannot read.

Each of them now raises. BsdDriver._read does this for any exit code outside the expected ones. Only pkg's "is not installed" still means "no packages".

BsdDriver also takes on napalm-device-types' HostStatusMixin. On FreeBSD it reports a host as needing a reboot when the installed kernel differs from the running one (device-types 4.1, NAPALM/napalm-device-types#23). On OpenBSD the answer stays unknown.

The README and CHANGELOG are updated. The Unreleased section is now all under "Added", since nothing has been released yet.

Closes #4

netOrk reads an empty update list as "no updates" and would close every patch clock on the host. Until now these all came back as an empty list: - a refused sudo; - a failing `pkg upgrade -n`, `syspatch -c`, `pkg_add -u -n` or `freebsd-update updatesready`; - a pkg database that pkg cannot read. Each of them now raises. `BsdDriver._read` does this for any exit code outside the expected ones. Only pkg's "is not installed" still means "no packages". `BsdDriver` also takes on napalm-device-types' `HostStatusMixin`. On FreeBSD it reports a host as needing a reboot when the installed kernel differs from the running one (device-types 4.1, NAPALM/napalm-device-types#23). On OpenBSD the answer stays unknown. The README and CHANGELOG are updated. The Unreleased section is now all under "Added", since nothing has been released yet. Closes #4
christianmanivong added 1 commit 2026-10-08 10:11:27 +00:00
fix: raise when an update reader cannot read, and report host status
CI / test (3.10) (push) Successful in 26s
CI / test (3.11) (push) Successful in 25s
CI / test (3.12) (push) Successful in 26s
CI / test (3.10) (pull_request) Successful in 25s
CI / test (3.11) (pull_request) Successful in 24s
CI / test (3.12) (pull_request) Successful in 26s
25308bf747
netOrk reads an empty update list as "no updates" and closes every patch
clock on the host. A refused sudo, a failing pkg, syspatch or freebsd-update,
or a pkg database pkg cannot read used to come back as that empty list. Each
of these now raises. Only pkg's "is not installed" still means no packages.

BsdDriver takes on napalm-device-types' HostStatusMixin. On FreeBSD it
reports a host whose installed kernel differs from the running one as
needing a reboot (device-types 4.1). OpenBSD stays unknown.

Closes #4
christianmanivong merged commit ae09e44345 into main 2026-10-08 10:15:14 +00:00
christianmanivong deleted branch feat/host-status 2026-10-08 10:15:14 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NAPALM/napalm-bsd#5