When /boot fills up, the next kernel's install script fails part-way. apt is left half-done, and the host quietly stays on its old kernel. kernelwatch noticed this only indirectly, if at all: the new kernel never shows up as installed, so nothing says a reboot is due.
Changes
Agent (0.6.0) sends three new fields:
boot_size_kb / boot_free_kb: from df -Pk /boot. When /boot isn't its own partition, that's the root filesystem. null if df fails or prints something unexpected.
dpkg_unfinished_packages: packages in the dpkg status database that are half-installed, unpacked, half-configured, waiting on triggers, or flagged reinst-required. These are the states dpkg --audit reports. Read-only, so it works as the unprivileged agent user.
Server:
A host goes to update when /boot has less than boot_min_free_mb free: "/boot has 95 MB free, 81% used; the next kernel may not fit". The new setting defaults to 200; 0 disables it.
A host goes to update when any package is unfinished: "N packages not fully installed: …; run dpkg --configure -a".
Both show on the host page ("/boot free", "Unfinished dpkg packages").
The existing status alert ("in update for status_alert_after_hours") covers both, so no new alert type.
Agents before 0.6.0 send neither field and are judged as before.
Docs: README status table, a new section in docs/how-it-works.md with the fix for each (apt autoremove --purge, dpkg --configure -a), and boot_min_free_mb in server.toml.example.
Notes
A report taken while apt is mid-install can briefly list packages as unfinished. The next hourly report clears it, and the 24h alert delay keeps it from sending an alert.
200 MB fits a typical Ubuntu kernel plus initramfs (often 100–150 MB together). Raise it if your initramfs images are larger.
Testing
make test: 254 tests pass.
New tests cover agent df parsing (normal, failure, garbage), each dpkg state (half-configured, unpacked, reinst-required, triggers, and ii/rc correctly ignored), the status reasons and thresholds (including truncation past five packages), boot_min_free_mb 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. Until each agent is upgraded, its host shows the usual "agent is older" note.
## Problem
When `/boot` fills up, the next kernel's install script fails part-way. apt is left half-done, and the host quietly stays on its old kernel. kernelwatch noticed this only indirectly, if at all: the new kernel never shows up as installed, so nothing says a reboot is due.
## Changes
**Agent (0.6.0)** sends three new fields:
- `boot_size_kb` / `boot_free_kb`: from `df -Pk /boot`. When `/boot` isn't its own partition, that's the root filesystem. `null` if df fails or prints something unexpected.
- `dpkg_unfinished_packages`: packages in the dpkg status database that are half-installed, unpacked, half-configured, waiting on triggers, or flagged reinst-required. These are the states `dpkg --audit` reports. Read-only, so it works as the unprivileged agent user.
**Server**:
- A host goes to `update` when `/boot` has less than `boot_min_free_mb` free: "/boot has 95 MB free, 81% used; the next kernel may not fit". The new setting defaults to 200; `0` disables it.
- A host goes to `update` when any package is unfinished: "N packages not fully installed: …; run dpkg --configure -a".
- Both show on the host page ("/boot free", "Unfinished dpkg packages").
- The existing status alert ("in `update` for `status_alert_after_hours`") covers both, so no new alert type.
- Agents before 0.6.0 send neither field and are judged as before.
**Docs**: README status table, a new section in `docs/how-it-works.md` with the fix for each (`apt autoremove --purge`, `dpkg --configure -a`), and `boot_min_free_mb` in `server.toml.example`.
## Notes
- A report taken while apt is mid-install can briefly list packages as unfinished. The next hourly report clears it, and the 24h alert delay keeps it from sending an alert.
- 200 MB fits a typical Ubuntu kernel plus initramfs (often 100–150 MB together). Raise it if your initramfs images are larger.
## Testing
- `make test`: 254 tests pass.
- New tests cover agent df parsing (normal, failure, garbage), each dpkg state (half-configured, unpacked, reinst-required, triggers, and `ii`/`rc` correctly ignored), the status reasons and thresholds (including truncation past five packages), `boot_min_free_mb` 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. Until each agent is upgraded, its host shows the usual "agent is older" note.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
A full /boot makes the next kernel's postinst fail: apt is left half-done
and the host quietly stays on its old kernel, which kernelwatch only
noticed indirectly, if at all. The agent now reports the size and free
space of the filesystem holding /boot (df) and the packages dpkg didn't
finish installing (half-installed, unpacked, half-configured, trigger
states or reinst-required, as dpkg --audit counts them).
The server puts a host in update when /boot has less than
boot_min_free_mb (default 200, 0 disables) free, or any package is
unfinished, with the fix in the reason ("run dpkg --configure -a"). The
host page shows both. Agents before 0.6.0 send neither field and are
judged as before. Agent 0.6.0.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
patrick
merged commit 5a11d31e66 into main2026-10-31 23:26:42 +00:00
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
When
/bootfills up, the next kernel's install script fails part-way. apt is left half-done, and the host quietly stays on its old kernel. kernelwatch noticed this only indirectly, if at all: the new kernel never shows up as installed, so nothing says a reboot is due.Changes
Agent (0.6.0) sends three new fields:
boot_size_kb/boot_free_kb: fromdf -Pk /boot. When/bootisn't its own partition, that's the root filesystem.nullif df fails or prints something unexpected.dpkg_unfinished_packages: packages in the dpkg status database that are half-installed, unpacked, half-configured, waiting on triggers, or flagged reinst-required. These are the statesdpkg --auditreports. Read-only, so it works as the unprivileged agent user.Server:
updatewhen/boothas less thanboot_min_free_mbfree: "/boot has 95 MB free, 81% used; the next kernel may not fit". The new setting defaults to 200;0disables it.updatewhen any package is unfinished: "N packages not fully installed: …; run dpkg --configure -a".updateforstatus_alert_after_hours") covers both, so no new alert type.Docs: README status table, a new section in
docs/how-it-works.mdwith the fix for each (apt autoremove --purge,dpkg --configure -a), andboot_min_free_mbinserver.toml.example.Notes
Testing
make test: 254 tests pass.ii/rccorrectly ignored), the status reasons and thresholds (including truncation past five packages),boot_min_free_mbvalidation, and the host page.Deploying
Upgrade the server, then run
agent/deploy.shacross the fleet. Until each agent is upgraded, its host shows the usual "agent is older" note.🤖 Generated with Claude Code
A full /boot makes the next kernel's postinst fail: apt is left half-done and the host quietly stays on its old kernel, which kernelwatch only noticed indirectly, if at all. The agent now reports the size and free space of the filesystem holding /boot (df) and the packages dpkg didn't finish installing (half-installed, unpacked, half-configured, trigger states or reinst-required, as dpkg --audit counts them). The server puts a host in update when /boot has less than boot_min_free_mb (default 200, 0 disables) free, or any package is unfinished, with the fix in the reason ("run dpkg --configure -a"). The host page shows both. Agents before 0.6.0 send neither field and are judged as before. Agent 0.6.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>