Most of the fleet relies on unattended-upgrades for security patches (Ubuntu Server enables it by default). When it breaks (a conffile prompt, a held package, a disabled timer), nothing showed until security updates piled up, and in a quiet week nothing piles up at all.
Changes
Agent (0.8.0) reports, read-only and without root:
unattended_upgrades: enabled (package installed and APT::Periodic::Unattended-Upgrade non-zero), disabled, or not-installed. A removed package's leftover config (dpkg state rc) counts as not installed.
unattended_upgrades_success_age_seconds: age of /var/lib/apt/periodic/upgrade-stamp, which apt.systemd.daily touches only when unattended-upgrade exits 0.
unattended_upgrades_run_age_seconds: age of unattended-upgrades-stamp, which unattended-upgrades writes whenever a run gets far enough, even if it then fails.
unattended_upgrades_kept_back: packages it won't upgrade, from /var/lib/unattended-upgrades/kept-back.
Server, for hosts with it enabled:
No success in unattended_upgrades_stale_after_days (new setting, default 3, 0 disables) puts the host in update. The reason says whether it's failing (it ran recently: check the log) or not running (check apt-daily-upgrade.timer), or has never succeeded.
Enabled but no run yet (freshly installed): a note.
Kept-back packages: a note.
The host page shows the state, both ages and the kept-back packages.
Hosts with it disabled or not installed, and agents before 0.8.0, are judged as before.
Docs: README status table, a section in docs/how-it-works.md, the setting in server.toml.example.
Notes
Assumes the stock apt-daily-upgrade.timer runs it. A host running unattended-upgrade from cron or Ansible won't update upgrade-stamp; set unattended_upgrades_stale_after_days = 0 there (documented).
Reading the actual error would mean reading the root-only /var/log/unattended-upgrades/, which needs another root helper unit; left out for now.
Testing
make test: 294 tests pass.
Agent: enabled (including intervals other than 1 and always), switched off, setting absent, removed-with-config-left (rc), not installed, kept-back parsing.
Server: healthy, at the limit, not running, running but failing, never succeeded, not run yet, disabled and not installed ignored, check disabled or raised, kept-back notes and truncation, config validation, host page.
shellcheck wasn't available locally; CI runs it.
Deploying
git pull on the server host and the workstation, reinstall the server, then ./agent/deploy.sh <hosts> -- --with-needrestart --with-apt-update (without sudo).
## Problem
Most of the fleet relies on unattended-upgrades for security patches (Ubuntu Server enables it by default). When it breaks (a conffile prompt, a held package, a disabled timer), nothing showed until security updates piled up, and in a quiet week nothing piles up at all.
## Changes
**Agent (0.8.0)** reports, read-only and without root:
- `unattended_upgrades`: `enabled` (package installed and `APT::Periodic::Unattended-Upgrade` non-zero), `disabled`, or `not-installed`. A removed package's leftover config (dpkg state `rc`) counts as not installed.
- `unattended_upgrades_success_age_seconds`: age of `/var/lib/apt/periodic/upgrade-stamp`, which `apt.systemd.daily` touches only when `unattended-upgrade` exits 0.
- `unattended_upgrades_run_age_seconds`: age of `unattended-upgrades-stamp`, which unattended-upgrades writes whenever a run gets far enough, even if it then fails.
- `unattended_upgrades_kept_back`: packages it won't upgrade, from `/var/lib/unattended-upgrades/kept-back`.
**Server**, for hosts with it enabled:
- No success in `unattended_upgrades_stale_after_days` (new setting, default 3, `0` disables) puts the host in `update`. The reason says whether it's **failing** (it ran recently: check the log) or **not running** (check `apt-daily-upgrade.timer`), or has **never succeeded**.
- Enabled but no run yet (freshly installed): a note.
- Kept-back packages: a note.
- The host page shows the state, both ages and the kept-back packages.
- Hosts with it disabled or not installed, and agents before 0.8.0, are judged as before.
**Docs**: README status table, a section in `docs/how-it-works.md`, the setting in `server.toml.example`.
## Notes
- Assumes the stock `apt-daily-upgrade.timer` runs it. A host running `unattended-upgrade` from cron or Ansible won't update `upgrade-stamp`; set `unattended_upgrades_stale_after_days = 0` there (documented).
- Reading the actual error would mean reading the root-only `/var/log/unattended-upgrades/`, which needs another root helper unit; left out for now.
## Testing
- `make test`: 294 tests pass.
- Agent: enabled (including intervals other than `1` and `always`), switched off, setting absent, removed-with-config-left (`rc`), not installed, kept-back parsing.
- Server: healthy, at the limit, not running, running but failing, never succeeded, not run yet, disabled and not installed ignored, check disabled or raised, kept-back notes and truncation, config validation, host page.
- shellcheck wasn't available locally; CI runs it.
## Deploying
`git pull` on the server host and the workstation, reinstall the server, then `./agent/deploy.sh <hosts> -- --with-needrestart --with-apt-update` (without sudo).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
patrick
added 3 commits 2026-11-01 00:27:17 +00:00
The agent now sends whether unattended-upgrades is enabled (package
installed, not just its leftover config, and APT::Periodic::Unattended-
Upgrade set and non-zero), the age of apt.systemd.daily's upgrade-stamp
(touched only when unattended-upgrade exits 0), the age of
unattended-upgrade's own stamp (written whenever a run gets far enough,
even if it then fails) and the packages it keeps back. Nothing reads them
yet. Agent 0.8.0.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a host with unattended-upgrades enabled, no successful run in
unattended_upgrades_stale_after_days (default 3, 0 disables) puts it in
update. The reason says which way it broke: still running but failing
("last succeeded 5d ago and is failing (last ran 6h ago); check
/var/log/unattended-upgrades/"), not running at all ("is
apt-daily-upgrade.timer enabled?"), or never succeeded. A host where it
hasn't completed its first run yet gets a note, and packages it keeps back
are noted. Hosts with it disabled or not installed, and agents before
0.8.0, are judged as before. The host page shows the state, both stamp
ages and the kept-back packages.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
Most of the fleet relies on unattended-upgrades for security patches (Ubuntu Server enables it by default). When it breaks (a conffile prompt, a held package, a disabled timer), nothing showed until security updates piled up, and in a quiet week nothing piles up at all.
Changes
Agent (0.8.0) reports, read-only and without root:
unattended_upgrades:enabled(package installed andAPT::Periodic::Unattended-Upgradenon-zero),disabled, ornot-installed. A removed package's leftover config (dpkg staterc) counts as not installed.unattended_upgrades_success_age_seconds: age of/var/lib/apt/periodic/upgrade-stamp, whichapt.systemd.dailytouches only whenunattended-upgradeexits 0.unattended_upgrades_run_age_seconds: age ofunattended-upgrades-stamp, which unattended-upgrades writes whenever a run gets far enough, even if it then fails.unattended_upgrades_kept_back: packages it won't upgrade, from/var/lib/unattended-upgrades/kept-back.Server, for hosts with it enabled:
unattended_upgrades_stale_after_days(new setting, default 3,0disables) puts the host inupdate. The reason says whether it's failing (it ran recently: check the log) or not running (checkapt-daily-upgrade.timer), or has never succeeded.Docs: README status table, a section in
docs/how-it-works.md, the setting inserver.toml.example.Notes
apt-daily-upgrade.timerruns it. A host runningunattended-upgradefrom cron or Ansible won't updateupgrade-stamp; setunattended_upgrades_stale_after_days = 0there (documented)./var/log/unattended-upgrades/, which needs another root helper unit; left out for now.Testing
make test: 294 tests pass.1andalways), switched off, setting absent, removed-with-config-left (rc), not installed, kept-back parsing.Deploying
git pullon the server host and the workstation, reinstall the server, then./agent/deploy.sh <hosts> -- --with-needrestart --with-apt-update(without sudo).🤖 Generated with Claude Code
On a host with unattended-upgrades enabled, no successful run in unattended_upgrades_stale_after_days (default 3, 0 disables) puts it in update. The reason says which way it broke: still running but failing ("last succeeded 5d ago and is failing (last ran 6h ago); check /var/log/unattended-upgrades/"), not running at all ("is apt-daily-upgrade.timer enabled?"), or never succeeded. A host where it hasn't completed its first run yet gets a note, and packages it keeps back are noted. Hosts with it disabled or not installed, and agents before 0.8.0, are judged as before. The host page shows the state, both stamp ages and the kept-back packages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>