From b6fc7fc05ef4480ae0a530e25ee404e627c0532d Mon Sep 17 00:00:00 2001 From: patrick Date: Sat, 31 Oct 2026 20:52:42 -0400 Subject: [PATCH] Document setting up Ubuntu Livepatch for a host docs/agents.md had nothing on Livepatch, though it's where you look when adding a host. New section: attaching Ubuntu Pro and enabling Livepatch, checking kernelwatch picks it up, what changes on the dashboard (reboot cover, its 14-day margin, alerts), that attaching also enables the ESM the end-of-support check counts, and the caveats (supported kernels only, turning it off sends one alert, nothing for Debian). Co-Authored-By: Claude Opus 5.5 --- docs/agents.md | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/docs/agents.md b/docs/agents.md index fa50719..3d0fbba 100644 --- a/docs/agents.md +++ b/docs/agents.md @@ -47,6 +47,61 @@ systemctl list-timers kernelwatch-agent.timer journalctl -u kernelwatch-agent ``` +## Ubuntu Livepatch + +[Livepatch](https://ubuntu.com/security/livepatch) applies high and critical +kernel fixes without a reboot. kernelwatch needs no setup for it: the agent +always installs `kernelwatch-livepatch.service`, which runs only on hosts that +have the `canonical-livepatch` snap. Turn Livepatch on for the host and the next +report picks it up. What it changes on the dashboard is in +[How it works](how-it-works.md) under "Ubuntu Livepatch". + +Livepatch is part of [Ubuntu Pro](https://ubuntu.com/pro), which is free for +personal use on up to five machines. Get your token from the +[Pro dashboard](https://ubuntu.com/pro/dashboard), then on the host: + +```sh +sudo pro attach # usually enables Livepatch and ESM too +sudo pro enable livepatch # no-op if attach already did +sudo canonical-livepatch status # check the kernel is supported and patches applied +``` + +Check that kernelwatch sees it: + +```sh +sudo systemctl start kernelwatch-agent # runs kernelwatch-livepatch.service first +sudo cat /run/kernelwatch/livepatch # LIVEPATCH-STATE: applied (or nothing-to-apply) +``` + +The host page then shows a Livepatch row, such as "applied, 2 fixes applied, +supported until 2027-09-07". From then on: + +- A newer kernel that's installed but not running, or a `/run/reboot-required` + caused only by `linux-*` packages, shows as a note ("live-patched; kernel + upgrade needed by ...") instead of putting the host in `reboot`. Other reboot + reasons (libc, systemd) still count. +- That cover ends 14 days before the running kernel's Livepatch support does, + and the host goes to `reboot` as usual. +- If Livepatch breaks, or a host that used to report it stops, you get an + [ntfy alert](alerts.md#stale-host-reboot-and-update-alerts-ntfy) after + `livepatch_alert_after_hours` (default 6). + +Attaching to Pro also enables ESM (`esm-infra`), which the OS end-of-support +check counts: an Ubuntu release past standard support stays fine while ESM is +on. The host page's "OS security support" row shows it. + +Things to know: + +- **Supported kernels only.** Livepatch covers LTS releases on the kernel + flavours Canonical supports. On any other kernel, `canonical-livepatch status` + says it isn't supported, and kernelwatch shows "livepatch not healthy (..., + unsupported)" and gives no reboot cover. +- **Turning it off.** After `sudo pro disable livepatch` (or `pro detach`), the + host stops reporting Livepatch, which looks the same as a dead daemon: you get + one alert after `livepatch_alert_after_hours`, then nothing more. That's + expected. +- **Debian** has no Livepatch; nothing here applies, and nothing needs turning off. + ## Deploying to many hosts `agent/deploy.sh` does all of the above over SSH from your workstation's -- 2.54.1