Report packages on hold, and flag held kernel packages

A held package never upgrades, and apt's simulation leaves it out, so
its updates (security ones included) appear nowhere. A leftover hold on
linux-image-amd64 or linux-generic keeps a host on its kernel while it
looks current.

The agent reports installed held packages (dpkg's "hi") as
held_packages. A held linux-* package puts the host in update with the
apt-mark unhold hint; other holds, usually deliberate, get a note. The
host page lists them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
patrickandClaude Opus 5.5 committed 2026-11-01 15:24:27 -05:00
1 parent f88261d2f5
commit 4676942108
7 files changed
+61 -1

No files matched your search

+10 -1
View File
@@ -10,7 +10,7 @@ Each host gets one status. When several apply, the worst one wins:
|----------|---------|
| `stale` | No report in `stale_after_hours` (default 3h), or never. Other data can't be trusted. |
| `reboot` | A newer kernel is installed but not running, or `/run/reboot-required` exists. |
| `update` | A kernel or security update is available but not installed, services are running outdated libraries and need a restart, or apt's package lists are too old (`apt_stale_after_hours`) for "no updates" to mean anything. Also when `/boot` has less than `boot_min_free_mb` free, dpkg left packages half-installed, the OS release no longer gets security updates, unattended-upgrades is enabled but hasn't succeeded in `unattended_upgrades_stale_after_days`, the release's security repository is missing from apt or hasn't refreshed in `security_repo_stale_after_days`, or one of kernelwatch's own helper units has failed three runs in a row. |
| `update` | A kernel or security update is available but not installed, services are running outdated libraries and need a restart, or apt's package lists are too old (`apt_stale_after_hours`) for "no updates" to mean anything. Also when `/boot` has less than `boot_min_free_mb` free, dpkg left packages half-installed, a kernel package is on hold, the OS release no longer gets security updates, unattended-upgrades is enabled but hasn't succeeded in `unattended_upgrades_stale_after_days`, the release's security repository is missing from apt or hasn't refreshed in `security_repo_stale_after_days`, or one of kernelwatch's own helper units has failed three runs in a row. |
| `ok` | Running the newest installed kernel, with no security or kernel updates pending. |
Each row also lists the reasons behind its status, and clicking a host shows
@@ -106,6 +106,15 @@ How the agent works it out:
host: `sudo dpkg --configure -a` (after freeing space, if that was the cause).
A report taken while apt is mid-install can show this briefly; the next one
clears it. Agents before 0.6.0 send neither field and are judged as before.
- **Packages on hold**: installed packages marked `hold` (`apt-mark hold`, or
dpkg's selection), from dpkg's status database. apt never upgrades them, and
the simulation doesn't list them, so their updates (security ones included)
don't show up anywhere else. A held `linux-*` package (`linux-image-amd64`,
`linux-generic`) would leave the host on its current kernel while looking up
to date, so it puts the host in `update`; release it with
`sudo apt-mark unhold <package>`. Other holds are usually deliberate and only
get a note. The host page lists them all. Agents before 0.10.0 don't report
holds.
- **OS end of support**: once a release stops getting security updates, apt
never offers one again, so the host would show `ok` indefinitely. The server
knows when each supported release's free security support ends