Document the unattended-upgrades check
CI / tests (Python 3.11) (pull_request) Successful in 31s
CI / tests (Python 3.10) (pull_request) Successful in 31s
CI / tests (Python 3.12) (pull_request) Successful in 31s
CI / tests (Python 3.13) (pull_request) Successful in 31s
CI / lint (pull_request) Successful in 3s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
patrickandClaude Opus 5.5 committed 2026-10-31 20:19:09 -04:00
1 parent bfac723850
commit da84ec1625
2 files changed
+20 -2

No files matched your search

+19 -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, dpkg left packages half-installed, or the OS release no longer gets security updates. |
| `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, the OS release no longer gets security updates, or unattended-upgrades is enabled but hasn't succeeded in `unattended_upgrades_stale_after_days`. |
| `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
@@ -108,6 +108,24 @@ How the agent works it out:
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.
- **unattended-upgrades**: Ubuntu Server enables it by default, and when it breaks
(a conffile prompt, a held package, a disabled timer) nothing shows until
security updates pile up. For hosts where it's **enabled** (the package is
installed and `APT::Periodic::Unattended-Upgrade` isn't `0`; leftover config
from a removed package doesn't count), the agent reports two timestamps from
`/var/lib/apt/periodic/`: `upgrade-stamp`, which apt's daily job touches only
when unattended-upgrades exits successfully, and `unattended-upgrades-stamp`,
which unattended-upgrades writes whenever a run gets far enough, even if it then
fails. No success in `unattended_upgrades_stale_after_days` (default 3) puts the
host in `update`, and the reason says which way it broke: "is failing" (it
runs, so read `/var/log/unattended-upgrades/` on the host) or "hasn't run" (check
`systemctl status apt-daily-upgrade.timer`). Packages it keeps back (held,
blacklisted, waiting on a conffile prompt) from
`/var/lib/unattended-upgrades/kept-back` are noted. Hosts where it's disabled or
not installed aren't affected; the host page shows which. It assumes the stock
`apt-daily-upgrade.timer` runs it: if you run `unattended-upgrade` from cron or
Ansible instead, the stamp isn't updated, so set
`unattended_upgrades_stale_after_days = 0`. Agents before 0.8.0 don't report it.
- **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