enroll-activate's internal 20m phase timeout SIGKILLs a still-progressing rented clan machines update, and the droplet never comes back — reboot-vs-no-reboot contradiction (follow-on to #700) #702
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Blocks
Reference
Matou/idss#702
Loading…
Add table
Add a link
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?
Failure: drive
20260823T104013Zreds atenroll-activate(sig073c79de3e67):founding: the rented server stand-up did not complete (status "blocked"): the node has not come back yet — wait for the reboot to finish, then re-drive to verify.legs.jsonrecordsenroll-activateatms: 1200753— within 1s of exactly 1,200,000ms (20 minutes). That is not a coincidence: it isdefaultPhaseTimeout(internal/clan/enrollment.go:67,20 * time.Minute), the internal wrapper everyclan/nixCLI invocation runs under (runPhase,internal/clan/enrollment.go:1171-1179). The reported fault text is the app's own fault frame (read viareadFault/data-status="journey-fault"), not Playwright'swaitForLeg"budget of Ns elapsed" message — confirming the Go-internal timeout fired first and killed the process, which the outer PlaywrightPAIR_FRONTIERceiling for this row (also 20m,app/tests/e2e/journey.rented.spec.ts:179) then simply observed.Mechanism:
founding-state.logshows the killed invocation's tail was normal, IN-PROGRESSnixos-rebuild switchoutput —sops-install-secrets: Imported /etc/ssh/ssh_host_{rsa,ed25519}_key…, then[gateway] NOT restarting the following changed units: systemd-fsck@dev-disk-by\x2dpartlabel-disk\x2dmain\x2dESP.service, …andFailed to reload user unit dbus-broker.service— i.e. the process was still actively progressing near the very end of activation when our own wrapper SIGKILLed it (internal/clan/errors.go:142-143reads exit 137/143 asFailInterrupted). Critically,enrollment.go:971-983's reconnect-backoff retry (built for exactly a 'box rebooted mid-takeover, first SSH honestly refuses' scenario, #426) only fires forFailConnectivity;FailInterruptedinstead breaks immediately (enrollment.go:984) straight to the resumable-blocked remedy, with zero retries. So whether or not the droplet was genuinely about to come back, this code path can't tell — our own kill pre-empts the classification that would let it try.Corroborating evidence the box stayed dark:
logs/droplet-journal.txt,droplet-units.txt,droplet-caddy.txt— all gathered after the red — showssh: connect to host 209.38.89.240 port 22: Connection timed out. The droplet never answered SSH again during this run.Open design contradiction (matches a very recent, still-unresolved item):
internal/founding/rentedpath.go:32-35documents the rented VMMode path as explicitly not rebooting ("No RotateHostKey (no reboot — the box keeps the host key connect learned)"), yet the fault text this sharedverify()code emits ("wait for the reboot to finish") and the box going permanently dark strongly resemble a reboot happening anyway. STATUS.md's current top entry (#700, commit734e466c, 2026-08-23) hit the same open question on a different droplet (170.64.134.129) and explicitly left it for a human: "whether the rented box actually rebooted (contradictingrentedpath.go's no-reboot assumption) and needs a host-key re-learn analogous to own-VPSRotateHostKey, or adisko.nix/DiskoLayoutdrift per GOTCHAS #47 — an infra investigation needing a live box … and a host-key-accept posture decision that is a one-way door." This drive reproduces the same shape on a fresh droplet, suggesting it's a recurring pattern rather than a one-off.Checked and ruled out:
docs/GOTCHAS.md#47 (disko/DiskoLayoutdrift bricking the box on reboot) is a plausible mechanism given the interrupted log names an ESP-partlabel unit (systemd-fsck@dev-disk-by\x2dpartlabel-disk\x2dmain\x2dESP.service), but the static contract test is green:GOWORK=$(pwd)/go.work CGO_ENABLED=0 go test ./internal/clan/... -run TestGatewayImageDiskoMatchesRenderDisko -v→ PASS. That only provesdisko.nixandrenderDiskoagree textually, not that the live droplet's actual on-disk partitioning matches at runtime — it doesn't clear the box.Suspected layer / what plugging it needs (why not self-fixed): this isn't a certain, mechanical single-constant fix. Two things are entangled and need a ruling with live-droplet access: (1) whether
clan machines updateon the rented VMMode path genuinely reboots (resolving therentedpath.gocontradiction) — if yes,rentedpath.go's comments/behavior need correcting and the retry logic (enrollment.go:971-994) needs to treat a plausibly-rebootingFailInterruptedas retry-eligible, not justFailConnectivity; if no, the real fix is elsewhere (disko/kernel/network fault killing the box outright, needing GOTCHAS #47-style live investigation, not a timeout bump). (2) Only once that's settled does wideningdefaultPhaseTimeout/theenroll-activatePAIR_FRONTIERceiling (mirroring the #698 enroll-copy precedent) become a safe, evidenced move — this run's log doesn't carry a quantifiable progress rate the way the copy leg's store-path count did, so I can't back a specific new number the way #698 did. Needs a session/human with live droplet access (or the drive's droplet console/serial log) to determine the actual reboot behavior and clear the box before any timeout number is trusted.drive
20260823T104013Zred atenroll-activate:journey leg "enroll-activate" went red: founding: the rented server stand-up did not complete (status "blocked"): the node has not come back yet — wait for the reboot to finish, then re-drive to verevidence:
test-results/…/20260823T104013Z/on matou-workstation (legs.json, droplet-journal.txt, trace) — a representative screenshot is attached here if one was captured (#596)Ruled by agent under ADR 0174 — veto anytime
The reboot-vs-no-reboot contradiction this ticket named is settled: NO, VMMode never reboots. Read clan-core's own
clan_lib/machines/update.py(_nixos_activate, the codeclan machines updateactually runs) directly from the pinned clan-cli in the nix store (/nix/store/minv5pvqianfkrvc1clj65cxiwr0357h-clan-cli-source). It never issues a reboot under any path: it runsswitch-to-configuration boot(bootloader entry only, for the next reboot) thenswitch(the live activation now); ifswitchis blocked by inhibitors it raises an error telling the operator to reboot manually — it never reboots itself, and this invocation is headless with no operator present to act on that message.So
rentedpath.go's "no RotateHostKey — no reboot" contract was correct all along. The actual bug wasinternal/clan/enrollment.go'sverify()— shared between FullInstall (own-VPS, which genuinely reboots mid-takeover, #426) and VMMode (never reboots) — hard-coding reboot language ("wait for the reboot to finish", "still coming back up after its reboot") for both.Fix (two-way door: revertible Go change, proven by a unit test, no security-posture widening — commit
01eedc89):verify()'s reconnect-retry and blocked-remedy messages now branch ons.Install == FullInstall(retryingConnectionMessage/blockedRemedyInstruction). VMMode's messages now say the node is "not answering" rather than claim a reboot in progress. Proven byTestEnroll_VMModeBlockedRemedyDoesNotClaimReboot(red before / green after); fullinternal/clansuite andgo vetclean.New finding, recorded as GOTCHAS #62:
_nixos_activatewraps the live switch insystemd-run --pipe --wait --collectspecifically (per its own docstring) "so the activation survives SSH connection drops" — the transient unit is systemd-managed on the TARGET, decoupled from the invoking SSH session. This means ourdefaultPhaseTimeoutSIGKILLing the LOCALclan machines updateprocess likely does not stop the REMOTE activation at all — the box's fate may already be sealed server-side regardless of our local wait. That materially changes this ticket's originally-suspected mechanism ("our own wrapper SIGKILLed a still-progressing update") and rules out the #698-style timeout-widening as a well-evidenced fix here: #698's ceiling bump helped because that leg's cost was a LOCAL transfer genuinely gated by local wall-clock; this leg's remote activation is not gated by how long our local process waits, and a blind widening could even risk a second overlappingswitch-to-configurationfiring on re-drive against a still-running first one.What's left open — filed as follow-up #703 (
ready-for-session, blocked-by #702): why THIS drive's specific droplet (209.38.89.240) never answered SSH again. GOTCHAS #47's disko drift is checked and ruled out for this shape (same as #700's analogous case —TestGatewayImageDiskoMatchesRenderDiskogreen, and there's no reboot in this path to trigger it anyway). The remaining lead is the interrupted log'sFailed to reload user unit dbus-broker.serviceline — a plausible live-service-reload failure during activation, independent of disko or reboot — but confirming that (or ruling it out) needs live-droplet/console evidence a future session should gather, not resolvable from a killed process's log tail alone. #703 gives that future session the systemd-run-detachment context up front so it doesn't re-derive it.Closing #702: its named question (the contradiction) is fully resolved and the fix is landed; the deeper "why did the box die" question is now a separately-scoped, properly-evidenced follow-up rather than being smuggled into "still open" on this ticket.