Flag hosts whose OS release no longer gets security updates
CI / tests (Python 3.10) (pull_request) Successful in 30s
CI / tests (Python 3.11) (pull_request) Successful in 30s
CI / tests (Python 3.12) (pull_request) Successful in 28s
CI / tests (Python 3.13) (pull_request) Successful in 28s
CI / lint (pull_request) Successful in 3s

Past its end of support a release gets no more security updates, so apt
offers nothing and the host showed ok indefinitely. The server now has a
table of when free security support ends for each release the agent
installs on (support.py): Debian's LTS end, and Ubuntu's end of standard
support plus end of ESM. Dates from Debian LTS and Ubuntu's release cycle
via endoflife.date; a test checks the table covers every release
agent/install.sh accepts.

The agent reports whether Ubuntu Pro is attached and esm-infra's status,
read from the pro client's world-readable status.json. A host past its
date goes to update; within os_eol_warn_days (default 90) of it, the row
gets a note. An Ubuntu host with ESM enabled isn't warned when standard
support ends, only before ESM does. The host page shows the dates.
Agent 0.7.0; older agents don't report ESM and count as having none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
patrickandClaude Opus 5.5 committed 2026-10-31 19:50:44 -04:00
1 parent 5a11d31e66
commit bc46c55298
15 files changed
+348 -7

No files matched your search

+17 -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, or dpkg left packages half-installed. |
| `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, or the OS release no longer gets security updates. |
| `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
@@ -92,6 +92,22 @@ 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.
- **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
(`server/kernelwatch/support.py`): for Debian, the end of
[LTS](https://wiki.debian.org/LTS), which carries on from regular security
support through the same repository; for Ubuntu, the end of standard support,
or with [ESM](https://ubuntu.com/security/esm) (`esm-infra`, part of Ubuntu Pro,
free for personal use) the end of ESM. The agent reads whether ESM is on from the
Ubuntu Pro client's public status file, `/var/lib/ubuntu-advantage/status.json`.
A host past its date is in `update` ("Debian 11 security support ended
2026-08-31"); in the `os_eol_warn_days` (default 90) before it, the row gets a
note. An Ubuntu host with ESM enabled gets no warning when standard support
ends, only before ESM does. The host page shows the dates. They're a table in
the server, so they need a kernelwatch update when a new release ships;
a release the table doesn't know is noted. Agents before 0.7.0 don't report
ESM, so an Ubuntu host on one counts as having none.
- **Fresh package lists**: the simulation only knows what apt's package lists
say, and the agent can't refresh them itself. Ubuntu refreshes them about once
a day. Debian doesn't by default unless `unattended-upgrades` is set up, so a