Compare commits

...
2 Commits
Author SHA1 Message Date
patrick 233645c738 Merge pull request 'Document setting up Ubuntu Livepatch for a host' (#29) from docs/livepatch-setup into main
CI / tests (Python 3.11) (push) Successful in 34s
CI / tests (Python 3.10) (push) Successful in 34s
CI / tests (Python 3.12) (push) Successful in 33s
CI / tests (Python 3.13) (push) Successful in 33s
CI / lint (push) Successful in 3s
Reviewed-on: #29
2026-11-01 00:55:40 +00:00
patrickandClaude Opus 5.5 b6fc7fc05e Document setting up Ubuntu Livepatch for a host
CI / tests (Python 3.10) (pull_request) Successful in 34s
CI / tests (Python 3.11) (pull_request) Successful in 34s
CI / tests (Python 3.12) (pull_request) Successful in 34s
CI / tests (Python 3.13) (pull_request) Successful in 34s
CI / lint (pull_request) Successful in 2s
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 <noreply@anthropic.com>
2026-10-31 20:52:42 -04:00
+55
View File
@@ -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 <token> # 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