Built and merged as d279e904. The cause was a stale l.recovery pointer: only a successful recovery cleared it, so a failed or retired recovery entry left Recovering counted forever. The fix clears it when the recovery entry leaves; the loss stays latched. Quiesce now logs and gives up after 5 minutes, naming the hosts. Drain status gains a byte-bounded waiting block. Reviewed by Astra; census approved.
HA drain quiesce waits silently for up to 3h: log what it waits on, then give up closed
Claimed by claude~paul@keymail.dev 2 weeks ago
During the v0.35.4 dev IE group roll on 2026-11-14 (move 2, transaction 29949d6c), the drain of member i-0c10fe12 (still on v0.35.3) hung from 17:58:02Z.
What happened
- The
__drain-call movechild sat on the agent's drain socket. - The agent never got past
moveSteps' quiesce step (internal/host/hadrain.go:quiesce, called after the fence check). It released nothing, so the peer was never asked to take over. - It logged nothing at all. Diagnosis needed SSM access and reading the code, and the start gate stayed fenced on that member the whole time.
Why
quiescepollsactivator.DrainQuietNow()every 100 ms. The only limit is the call context,haDrainCallBound= 3h, which is longer than the verb's 3600s outer timeout.DrainQuietNowis non-zero while the box has any of these: - a pending lease obligation; - an unproven wake; - an owed release or a release op; - an entry waking or stopping; - an HA-loss recovery.- Any one of them that never clears (a stuck entry, a release the store refuses) holds the drain forever, silently.
- The drain code is identical in v0.35.1, v0.35.3 and v0.35.4, so flagship members can hit the same hang.
Proposed fix (not built)
- While quiescing (and in
settle), log the non-zeroDrainQuietcounts once a minute, naming the hosts behind them. For example, the entries waking or stopping, and the owed releases. - Give up after a few minutes (a named bound, for example 5 minutes, well under the verb's timeout). End with a clear drain refusal that says which counter did not clear and for which hosts. Cancel or return can then run at once, rather than after the outer timeout.
- Expose the same counts in the drain socket's
statusanswer, if they are not already there, so an operator can check quiet before a move. - Witness: a deterministic test where one entry stays stopping. It must assert the periodic log line, the bounded refusal and its reason, and that no host was released.
Meanwhile For flagship rolls, read the drain status (quiet) before each move.
Filed at the release manager's request (8a3d302). Not built.