[P2] No watchdog/timeout around reconcile Step() #4
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
[claude 2026-07-02] From architecture review (data plane). syncclient worker calls Engine.Step(ctx,snap) serially (internal/agent/syncclient/client.go:231-249). A slow op inside Step — disk prep, seed ISO build — can block the worker indefinitely; only imagecache has its own 10m timeout. A stall backs up the ticker and stops all reports for that host with no signal. Add a per-Step deadline (context.WithTimeout) or a watchdog that logs/aborts a Step exceeding N minutes so one wedged VM op cannot silently freeze the agent's whole reconcile loop.
Migrated from git-collab issue
af3fa8873b0028952608362336924e2edc17fdc6.Original author: a73x dev@a73x.sh.
Close reason: Fixed by patch
9dafc985[claude 2026-07-03] Picking this up. Plan: reconcile.Engine gains a StepTimeout field — Step() wraps its ctx with context.WithTimeout at entry (zero = disabled, so existing tests unaffected); main.go wires a 15m default (deliberately above imagecache's own 10m HTTP timeout so a legitimate first-time image download is never aborted). A wedged disk-prep/seed op then fails the create with DeadlineExceeded and retries next cycle instead of freezing the agent forever.