Flag hosts whose OS release no longer gets security updates #26

Merged
patrick merged 1 commits from feat/os-end-of-support into main 2026-10-31 23:53:27 +00:00
Owner

Problem

Once a release reaches end of support, apt never offers another security update, so the host shows ok indefinitely. Nothing in kernelwatch noticed when a release went out of support.

Changes

Server: a new server/kernelwatch/support.py lists when free security support ends for each release the agent installs on:

Release Support ends ESM ends
Debian 11 2026-08-31 (LTS) –
Debian 12 2028-06-30 (LTS) –
Debian 13 2030-06-30 (LTS) –
Ubuntu 20.04 2025-05-31 (standard) 2030-04-23
Ubuntu 22.04 2027-06-01 (standard) 2032-04-21
Ubuntu 24.04 2029-05-31 (standard) 2034-04-25
Ubuntu 26.04 2031-05-29 (standard) 2036-04-23

Dates come from Debian LTS and Ubuntu's release cycle, via endoflife.date. For Debian, LTS counts as support: it's free and continues through the same security repository.

  • Past the date: the host goes to update, e.g. "Debian 11 security support ended 2026-08-31; upgrade the release". The existing status_alert_after_hours alert covers it.
  • Before the date: within os_eol_warn_days (new setting, default 90; 0 disables), the row gets a note.
  • Ubuntu: a host past standard support is fine while esm-infra is enabled. It's in update without ESM, and warned only before ESM ends.
  • Unknown releases: a release missing from the table gets a note.
  • Host page: a new "OS security support" row.

Agent (0.7.0): reports ubuntu_pro_attached and ubuntu_esm_infra, read from the Ubuntu Pro client's world-readable /var/lib/ubuntu-advantage/status.json. It doesn't need root or the pro command, and reports null on Debian, when the file is missing, or when the file isn't valid JSON. A service the cache lists as available on an unattached machine doesn't count as enabled.

Docs: README status table, a new section in docs/how-it-works.md, and os_eol_warn_days in server.toml.example.

Notes

  • The dates are a table in the server, so a new release needs a kernelwatch update. tests/test_support.py fails if agent/install.sh accepts a release the table doesn't list.
  • Agents before 0.7.0 don't report ESM, so an Ubuntu host on one counts as having none. This only matters for a host past standard support (none in the fleet today) and clears after agent/deploy.sh.

Testing

  • make test: 278 tests pass.
  • New tests cover the release table against the installer, Debian and Ubuntu logic on and around each boundary (warning window, ended, with and without ESM, warnings disabled), the agent's parsing of the Pro status file (attached, ESM disabled, unattached, missing, invalid, unexpected value), status integration, config validation and the host page.
  • shellcheck wasn't available locally; CI runs it.

Deploying

Upgrade the server, then run agent/deploy.sh across the fleet (without sudo), from an up-to-date checkout.

🤖 Generated with Claude Code

## Problem Once a release reaches end of support, apt never offers another security update, so the host shows `ok` indefinitely. Nothing in kernelwatch noticed when a release went out of support. ## Changes **Server**: a new `server/kernelwatch/support.py` lists when free security support ends for each release the agent installs on: | Release | Support ends | ESM ends | |---|---|---| | Debian 11 | 2026-08-31 (LTS) | – | | Debian 12 | 2028-06-30 (LTS) | – | | Debian 13 | 2030-06-30 (LTS) | – | | Ubuntu 20.04 | 2025-05-31 (standard) | 2030-04-23 | | Ubuntu 22.04 | 2027-06-01 (standard) | 2032-04-21 | | Ubuntu 24.04 | 2029-05-31 (standard) | 2034-04-25 | | Ubuntu 26.04 | 2031-05-29 (standard) | 2036-04-23 | Dates come from Debian LTS and Ubuntu's release cycle, via endoflife.date. For Debian, LTS counts as support: it's free and continues through the same security repository. - **Past the date:** the host goes to `update`, e.g. "Debian 11 security support ended 2026-08-31; upgrade the release". The existing `status_alert_after_hours` alert covers it. - **Before the date:** within `os_eol_warn_days` (new setting, default 90; `0` disables), the row gets a note. - **Ubuntu:** a host past standard support is fine while esm-infra is enabled. It's in `update` without ESM, and warned only before ESM ends. - **Unknown releases:** a release missing from the table gets a note. - **Host page:** a new "OS security support" row. **Agent (0.7.0)**: reports `ubuntu_pro_attached` and `ubuntu_esm_infra`, read from the Ubuntu Pro client's world-readable `/var/lib/ubuntu-advantage/status.json`. It doesn't need root or the `pro` command, and reports `null` on Debian, when the file is missing, or when the file isn't valid JSON. A service the cache lists as available on an unattached machine doesn't count as enabled. **Docs**: README status table, a new section in `docs/how-it-works.md`, and `os_eol_warn_days` in `server.toml.example`. ## Notes - The dates are a table in the server, so a new release needs a kernelwatch update. `tests/test_support.py` fails if `agent/install.sh` accepts a release the table doesn't list. - Agents before 0.7.0 don't report ESM, so an Ubuntu host on one counts as having none. This only matters for a host past standard support (none in the fleet today) and clears after `agent/deploy.sh`. ## Testing - `make test`: 278 tests pass. - New tests cover the release table against the installer, Debian and Ubuntu logic on and around each boundary (warning window, ended, with and without ESM, warnings disabled), the agent's parsing of the Pro status file (attached, ESM disabled, unattached, missing, invalid, unexpected value), status integration, config validation and the host page. - shellcheck wasn't available locally; CI runs it. ## Deploying Upgrade the server, then run `agent/deploy.sh` across the fleet (without sudo), from an up-to-date checkout. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
patrick added 1 commit 2026-10-31 23:52:10 +00:00
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
bc46c55298
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>
patrick merged commit 6cbc9665d8 into main 2026-10-31 23:53:27 +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: patrick/kernel-automation#26