fix(doctor): pin the probes' stdin — an interactive exec cannot be timed out #42
No reviewers
Labels
No labels
blocked
blocker:ci-red
blocker:conflict
blocker:drill-pending
blocker:unrequested
bug
claimed
documentation
enhancement
epic
merge-next
needs-triage
ready
release
scope:cli
scope:drill
scope:host
scope:installer
scope:templates
scope:tiers
stale
state:addressing
state:bots-reviewing
state:building
state:needs-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: heavy-duty/box#42
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/doctor-probe-hangs"
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?
Observed live on the drill host, twice in a row: the doctor hangs at "Can a box actually resolve DNS?" — 15+ minutes, and Ctrl-C does not work; the operator had to kill the shell. The daemon and the box's agent were both fine (
timeout 10 incus exec t1 -- true→ exit 0).The bug
With a TTY on stdin,
incus execgoes interactive: it attaches the operator's terminal and puts it in raw mode. Every probe in the doctor's DNS section runs exactly that way:Three failures stack:
timeout's bare SIGTERM never takes — and without-kit is never escalated to SIGKILL;^Cis forwarded into the box as a keystroke instead of interrupting the script — which is why the hang survives Ctrl-C.The drill already knows this
drill.shlearned the identical lesson in #22 —exec_inpins stdin and escalates:The doctor's probe section was added later (#34/#35) and never got the cure. Same disease as trap 12 and its eleven ancestors: the wrapper looked hang-proof —
timeoutstood in for the fact of termination.The fix
All four probes:
</dev/null+timeout -k 5, and a comment stating the rule so the next probe added to this file inherits it.Note for the log: on the live host the
--pin-dnsmutation did land before the hang (OK set raw.dnsmasq…printed) — the hang was only ever in the verification probe.🤖 Generated with Claude Code