kernelwatch-apt-update.service failed every hour on most hosts for weeks
(fixed in #30) and nothing showed it: the agent only Wants= its helper units,
so reports kept going out with stale data. This makes that kind of failure
visible, and covers two more ways a host can look current when it isn't.
Changes (agent 0.10.0)
Helper unit failures.kernelwatch-apt-update and kernelwatch-needrestart run a new kernelwatch-unit-result script as
their ExecStopPost=. It records each run's result and how many runs in a
row have failed in /run/kernelwatch/<name>.result. 1–2 failures: a note.
3 in a row (about 3h): update, naming the unit, its exit status and journalctl -u. Livepatch isn't tracked: its unit fails by design when the
snap is installed but Livepatch isn't enabled, and it has its own check.
New "kernelwatch helpers" row on the host page.
Packages on hold. Installed hold packages are reported. A held linux-* package puts the host in update, since apt's simulation never
lists it. Other holds get a note.
CPU microcode. needrestart's nstalled but
not loaded) puts the host in reboot. Livepatch doesn't cover it. Bare
metal only; needrestart skips the
Deploying
Update the server first, then agente installer adds /usr/local/sbin/kernelwatch-unit-result` along with the updated units.
## Why
kernelwatch-apt-update.service failed every hour on most hosts for weeks
(fixed in #30) and nothing showed it: the agent only `Wants=` its helper units,
so reports kept going out with stale data. This makes that kind of failure
visible, and covers two more ways a host can look current when it isn't.
## Changes (agent 0.10.0)
1. **Helper unit failures.** `kernelwatch-apt-update` and
`kernelwatch-needrestart` run a new `kernelwatch-unit-result` script as
their `ExecStopPost=`. It records each run's result and how many runs in a
row have failed in `/run/kernelwatch/<name>.result`. 1–2 failures: a note.
3 in a row (about 3h): `update`, naming the unit, its exit status and
`journalctl -u`. Livepatch isn't tracked: its unit fails by design when the
snap is installed but Livepatch isn't enabled, and it has its own check.
New "kernelwatch helpers" row on the host page.
2. **Packages on hold.** Installed `hold` packages are reported. A held
`linux-*` package puts the host in `update`, since apt's simulation never
lists it. Other holds get a note.
3. **CPU microcode.** needrestart's nstalled but
not loaded) puts the host in `reboot`. Livepatch doesn't cover it. Bare
metal only; needrestart skips the
## Deploying
Update the server first, then `agente installer
adds `/usr/local/sbin/kernelwatch-unit-result` along with the updated units.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
patrick
added 3 commits 2026-11-01 20:27:50 +00:00
kernelwatch-apt-update.service failed hourly on most hosts for weeks
without anything showing it. The agent only Wants= its helper units, so
the report goes out regardless, with stale lists or (for needrestart)
results that quietly turn "unknown".
Each helper (apt-update, needrestart) now runs kernelwatch-unit-result
as its ExecStopPost=, which systemd runs after failed runs too. It
writes "RESULT EXIT_CODE EXIT_STATUS FAILURES" to
/run/kernelwatch/<name>.result, FAILURES counting failed runs in a row.
The agent (0.10.0) reports results from the last two hours as
helper_units. On the server, one or two failures are a note (an admin's
apt can hold the lock now and then); three in a row put the host in
update, naming the unit and its exit status and pointing at journalctl.
The host page gets a "kernelwatch helpers" row.
The Livepatch unit isn't tracked: it fails by design where the snap is
installed but Livepatch isn't enabled, and Livepatch has its own check.
The apt-update unit now has RuntimeDirectory=kernelwatch (preserved,
like the others) for its result file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
On bare metal, needrestart -b reports NEEDRESTART-UCSTA: 2 when the
installed intel-microcode/amd64-microcode is newer than what the CPU
loaded at boot, which only a reboot fixes. The agent dropped those
lines. It now reports needrestart_ucsta, _uccur and _ucexp, and the
server puts the host in reboot with both revisions. Livepatch doesn't
cover it. needrestart skips the check in VMs, so only physical hosts
(debian-homelab today) report it; the host page gets a "CPU microcode"
row.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Why
kernelwatch-apt-update.service failed every hour on most hosts for weeks
(fixed in #30) and nothing showed it: the agent only
Wants=its helper units,so reports kept going out with stale data. This makes that kind of failure
visible, and covers two more ways a host can look current when it isn't.
Changes (agent 0.10.0)
kernelwatch-apt-updateandkernelwatch-needrestartrun a newkernelwatch-unit-resultscript astheir
ExecStopPost=. It records each run's result and how many runs in arow have failed in
/run/kernelwatch/<name>.result. 1–2 failures: a note.3 in a row (about 3h):
update, naming the unit, its exit status andjournalctl -u. Livepatch isn't tracked: its unit fails by design when thesnap is installed but Livepatch isn't enabled, and it has its own check.
New "kernelwatch helpers" row on the host page.
holdpackages are reported. A heldlinux-*package puts the host inupdate, since apt's simulation neverlists it. Other holds get a note.
not loaded) puts the host in
reboot. Livepatch doesn't cover it. Baremetal only; needrestart skips the
Deploying
Update the server first, then
agente installer adds/usr/local/sbin/kernelwatch-unit-result` along with the updated units.🤖 Generated with Claude Code