enroll-activate: an interrupted activate should ask the box whether the remote switch finished before conceding the block #714

Closed
opened 2026-08-23 21:23:46 +00:00 by matou-build-agent · 2 comments

Follow-up from #713 (GOTCHAS #68), filed rather than done — the ceiling widening it accompanies is the two-way part; this is a behaviour change on the recovery path and deserves its own red-before-green.

What stands today. verify() (internal/clan/enrollment.go) treats a signal-killed clan machines update as FailInterrupted and blocks resumable IMMEDIATELY — no retry, no probe. But clan-core wraps the remote activation in systemd-run --pipe --wait --collect precisely so it survives the invoking ssh session (GOTCHAS #62), so our local SIGKILL does not stop it: the box very often goes on to finish the switch seconds or minutes later, and the drive is already red.

This is exactly what drive 20260823T193424Z looks like: killed at 1200808ms mid-switch, on a box the #713 reproduction shows answering ping/TCP/ssh throughout and completing its switch in 8m08s.

What it should do. On FailInterrupted at the activate, before conceding: knock on the box (it is reachable — that is the whole point) and compare readlink /run/current-system against the toplevel enroll-build recorded (snap.Toplevel). Equal → the remote switch finished after our kill and the node IS a clan member; the stage lands green. Not equal → concede the resumable block as today, but with the box's ACTUAL current system named in the remedy instead of "the node has not come back yet".

Why it matters beyond the red. #62 flags the second hazard: a re-drive after a kill fires a SECOND switch-to-configuration at a box that may still be running the first. A completion probe removes most of those re-drives.

Shape: seam-level, internal/clan only, testable against the existing enrollCLI double (script an interrupted update + a scripted readlink answer). No droplet needed to prove it; the live confirmation rides the next rented drive.

Ruled by agent under ADR 0174 — veto anytime: #713's session scoped this OUT deliberately (one ticket, and the ceiling fix is provable on its own evidence) rather than widening its own blast radius.

Follow-up from #713 (GOTCHAS #68), filed rather than done — the ceiling widening it accompanies is the two-way part; this is a behaviour change on the recovery path and deserves its own red-before-green. **What stands today.** `verify()` (`internal/clan/enrollment.go`) treats a signal-killed `clan machines update` as `FailInterrupted` and blocks resumable IMMEDIATELY — no retry, no probe. But clan-core wraps the remote activation in `systemd-run --pipe --wait --collect` precisely so it survives the invoking ssh session (GOTCHAS #62), so our local SIGKILL does not stop it: the box very often goes on to finish the switch seconds or minutes later, and the drive is already red. This is exactly what drive `20260823T193424Z` looks like: killed at 1200808ms mid-switch, on a box the #713 reproduction shows answering ping/TCP/ssh throughout and completing its switch in 8m08s. **What it should do.** On `FailInterrupted` at the activate, before conceding: knock on the box (it is reachable — that is the whole point) and compare `readlink /run/current-system` against the toplevel `enroll-build` recorded (`snap.Toplevel`). Equal → the remote switch finished after our kill and the node IS a clan member; the stage lands green. Not equal → concede the resumable block as today, but with the box's ACTUAL current system named in the remedy instead of "the node has not come back yet". **Why it matters beyond the red.** #62 flags the second hazard: a re-drive after a kill fires a SECOND `switch-to-configuration` at a box that may still be running the first. A completion probe removes most of those re-drives. **Shape:** seam-level, `internal/clan` only, testable against the existing `enrollCLI` double (script an interrupted update + a scripted `readlink` answer). No droplet needed to prove it; the live confirmation rides the next rented drive. Ruled by agent under ADR 0174 — veto anytime: #713's session scoped this OUT deliberately (one ticket, and the ceiling fix is provable on its own evidence) rather than widening its own blast radius.
Author
Member

Cross-reference from the #743 session (no re-triage, no label change — informational only).

As of 2026-08-24 ~04:30Z this defect is the single blocker of the whole rehearsal drive programme, on both hosts:

  • #714 (this, deferred) → recurrence #742 (open, agent-blocked) → blocks #720 (rented phase-4 confirmation, elitebook-03).
  • #720 blocks #721 (phase-3 regression, matou-workstation), which blocks #722 (phase-2 regression). The workstation executor has logged queue [721,722] → driving #721 → #721 blocked by 1 open issue(s) — the swarm is plugging every 2 minutes since ~00:27Z.
  • #720 also gates #743 (#724'''s live cert-persistence proof), now natively blocked on #742.

So nothing rehearsal-side drives anywhere until this closes. Flagging the changed cost of the deferred label; the ruling on whether to un-defer is not mine to make here.

Cross-reference from the #743 session (no re-triage, no label change — informational only). As of 2026-08-24 ~04:30Z this defect is the **single blocker of the whole rehearsal drive programme, on both hosts**: - #714 (this, `deferred`) → recurrence #742 (open, `agent-blocked`) → blocks **#720** (rented phase-4 confirmation, elitebook-03). - **#720 blocks #721** (phase-3 regression, matou-workstation), which blocks #722 (phase-2 regression). The workstation executor has logged `queue [721,722] → driving #721` → `#721 blocked by 1 open issue(s) — the swarm is plugging` every 2 minutes since ~00:27Z. - #720 also gates **#743** (#724'''s live cert-persistence proof), now natively blocked on #742. So nothing rehearsal-side drives anywhere until this closes. Flagging the changed cost of the `deferred` label; the ruling on whether to un-defer is not mine to make here.
ben closed this issue 2026-08-24 13:19:09 +00:00
Owner

Close report

Landed a9b132c (pushed via merge 42c6988). verify() now, on FailInterrupted alone (never a severed ctx or a connectivity break), with a built toplevel and target on the snapshot, knocks once — probeCurrentSystem reads readlink -f /run/current-system over the box's own ssh door (UnitActive's transport discipline; verdict = last non-empty line, store paths only). Equal to snap.Toplevel → the switch finished after our kill and the stage lands green on the box's own evidence. Different → the same resumable block, remedy naming what the box is actually running. Unreachable / no toplevel → today's block, byte-identical. Red-before-green: internal/clan/enroll_activate_interrupted_test.go (4 tests; note: the test file + GOTCHAS #68 amendment physically rode 90154b8 after a shared-index race — content identical). Un-deferral = Ben's ruling 2026-08-24 after the third live recurrence stalled the whole drive programme.

## Close report Landed `a9b132c` (pushed via merge `42c6988`). `verify()` now, on `FailInterrupted` alone (never a severed ctx or a connectivity break), with a built toplevel and target on the snapshot, knocks once — `probeCurrentSystem` reads `readlink -f /run/current-system` over the box's own ssh door (UnitActive's transport discipline; verdict = last non-empty line, store paths only). Equal to `snap.Toplevel` → the switch finished after our kill and the stage lands green on the box's own evidence. Different → the same resumable block, remedy naming what the box is actually running. Unreachable / no toplevel → today's block, byte-identical. Red-before-green: `internal/clan/enroll_activate_interrupted_test.go` (4 tests; note: the test file + GOTCHAS #68 amendment physically rode `90154b8` after a shared-index race — content identical). Un-deferral = Ben's ruling 2026-08-24 after the third live recurrence stalled the whole drive programme.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#714
No description provided.