Skip to content

A node that stops running watchtower keeps its last allow for ever, so updater_status reads stuck permanently

Id: TD-PPagop-26082913 · Status: resolved · Filed: 2026-08-29 · Resolved: 2026-08-30 · Ref: https://github.com/Poetic-Poems/agent-ops/pull/1075

lib/updater-health.sh’s updater_status (agent-ops#603) reports stuck when this container’s own ledger ends in a run of allow entries older than updater_stuck_after_minutes. The ledger is pruned only by deploy/docker/watchtower-pre-update.sh itself — the hook trims to 48 hours of entries on each invocation — so a node whose auto-update profile is taken down (or whose watchtower is stopped, removed, or otherwise never polls again) after a roll was once allowed keeps that final allow line indefinitely, and every heartbeat from then on publishes {status: "stuck"}. The dashboard shows a permanent amber updater stuck badge for a node that is deliberately not being updated, and the badge’s own promise — a fault only a human clears — is technically true but says the wrong thing about why.

Why it matters. The refinement’s “not applicable — must never read as failing” state covers only a node that never ran watchtower (no ledger at all, which reads null). A node that ran it and stopped falls through to the failing reading instead, which is the one direction this check was explicitly not meant to get wrong. An amber badge nobody can clear is also how a fleet learns to ignore amber badges, which costs the real 2026-08-14 signature its audience.

Where. lib/updater-health.sh (updater_status’s own-file allow branch), deploy/docker/watchtower-pre-update.sh (record_verdict’s pruning, the only writer), docs/DASHBOARD-SPEC.md and docs/IMPLEMENTATION-PIPELINE-SPEC.md requirement 2.5 (the badge and the heartbeat tuple, both of which describe the states).

Suggested fix. Bound the allow run: past some age with no further invocation recorded, report null (unanswerable — nothing is polling this container) rather than stuck. The bound is a second threshold, and which one is right is a judgement about how the fleet is operated — a small multiple of WATCHTOWER_POLL_INTERVAL would distinguish “watchtower is asking and failing” from “watchtower has stopped asking”, but a node whose watchtower is merely paused for an hour should not flip to unknown and back. Deliberately not invented during review for that reason.

Noticed while reviewing https://github.com/Poetic-Poems/agent-ops/pull/929, which introduces the check.