enroll-configure: eval-preflight SSH reconnect-loop burns the 360s leg budget #406

Closed
opened 2026-08-10 17:23:25 +00:00 by ben · 2 comments
Owner

Failure

Leg enroll-configure went red on a Playwright timeout, not a reported product error:

JourneyFailure: journey leg "enroll-configure" went red: budget of 360s elapsed at "enroll-configure" — last activity: Warning: Permanently added '170.64.185.150' (ED25519) to the list of known hosts.

The UI was parked at 8% on the row "Prepare the gateway configuration — eval preflight · machine vars" for the whole 360s budget with no further activity text ever landing (artifacts/journey.droplet-.../error-context.md).

Evidence

logs/droplet-journal.txt (the real DigitalOcean droplet's own journal) shows the harness's IP (134.199.154.244) making two short, clean SSH probes right after cloud-init finished:

Aug 10 17:12:38 ... sshd[1084]: Accepted publickey for root from 134.199.154.244 port 58680 ssh2: ED25519 SHA256:tTlbTNst+AtF13f69h9w+SozJIumFspCgL7wcOTbmQQ
Aug 10 17:12:39 ... sshd[1084]: Received disconnect from 134.199.154.244 port 58680:11: disconnected by user
Aug 10 17:12:52 ... sshd[1391]: Accepted publickey for root from 134.199.154.244 port 49922 ssh2: ED25519 SHA256:tTlbTNst+AtF13f69h9w+SozJIumFspCgL7wcOTbmQQ
Aug 10 17:12:52 ... sshd[1391]: Received disconnect from 134.199.154.244 port 49922:11: disconnected by user

Then, after a ~2m23s quiet gap, the same source IP starts hammering sshd with a new connection every 1-4s that never completes authentication — 180 of these between 17:15:15 and 17:19:07:

Aug 10 17:15:15 ... sshd[7602]: Connection closed by authenticating user root 134.199.154.244 port 51956 [preauth]
Aug 10 17:15:16 ... sshd[7604]: Connection closed by authenticating user root 134.199.154.244 port 51970 [preauth]
... (178 more, same shape, same source IP, ~1-4s apart) ...
Aug 10 17:19:07 ... sshd[7966]: Connection closed by authenticating user root 134.199.154.244 port 58916 [preauth]
Aug 10 17:19:08 ... sshd[7970]: Accepted publickey for root from 134.199.154.244 port 58938 ssh2: ED25519 SHA256:tTlbTNst+AtF13f69h9w+SozJIumFspCgL7wcOTbmQQ

The droplet itself never rebooted in between (no new boot/cloud-init sequence anywhere in the journal after 17:13:26) and never logs anything about nix/clan/enroll work — whatever is looping is on the harness/host side, not something the droplet is waiting on.

Suspected layer

Product — the own-VPS enroll-configure leg. This is exactly the code most recently touched: f989696 enroll-configure generates the gateway's vars before the eval preflight, eabd46b own-VPS gateway seed sets nixpkgs.hostPlatform, 80b25e6 own-VPS gateway seed flake must nix-eval. The signature — one connection that authenticates and disconnects cleanly (twice), then a quiet gap consistent with local vars-generation/eval work, then a 4-minute burst of same-IP connections that all die during [preauth] — reads as the eval-preflight/deploy step reopening SSH (plausibly several at once, e.g. for a parallel store-path copy) faster than sshd can complete them, cascading into a retry loop that never recovers inside the 360s leg budget. This is not the known own-VPS pairing frontier ("pairing never flips") — that's a different failure shape, and this run's artifacts/legs.json is empty ([]) so there's no skip reason recorded to confirm or rule it out either way.

Gaps in this run's own evidence

  • artifacts/legs.json is [] and artifacts/journey.json has rows: null, fault: null — the harness's own per-leg instrumentation recorded nothing for this run.
  • logs/helper.log and logs/reporter-claude.err are both empty — no host-side helper/reporter trace survives to corroborate what the eval-preflight step was doing during the quiet or hammering windows.
  • logs/guest-*.log are all empty and artifacts/host.json shows qemu: exit ENOENT: spawn qemu-system-x86_64 ENOENT — expected and irrelevant here, since this is an own-VPS drive with no local qemu guest.

What plugging it needs

Trace what enroll-configure's eval-preflight/machine-vars stage does with its SSH connection(s) after the first two clean probes at 17:12:38/17:12:52 — specifically whether it opens a fresh SSH connection per check/copy instead of reusing one (ControlMaster/multiplexing), and whether it backs off after a [preauth] failure or immediately retries. Fixing the reconnect strategy (reuse one connection, add backoff) should stop the 4-minute stall and let the leg clear inside its 360s budget. Also worth a follow-up: legs.json/journey.json/helper.log being empty on a run that got far enough to found the community (state/founding-state.json shows founded: true) suggests the instrumentation itself has a gap worth closing so the next red run leaves a fuller trail.

drive 20260810T171130Z red at wizard: drive red at wizard — the wizard died before any leg ran
evidence: test-results/…/20260810T171130Z/ on matou-workstation (legs.json, droplet-journal.txt, trace)

## Failure Leg **enroll-configure** went red on a Playwright timeout, not a reported product error: > `JourneyFailure: journey leg "enroll-configure" went red: budget of 360s elapsed at "enroll-configure" — last activity: Warning: Permanently added '170.64.185.150' (ED25519) to the list of known hosts.` The UI was parked at 8% on the row **"Prepare the gateway configuration — eval preflight · machine vars"** for the whole 360s budget with no further activity text ever landing (`artifacts/journey.droplet-.../error-context.md`). ## Evidence `logs/droplet-journal.txt` (the real DigitalOcean droplet's own journal) shows the harness's IP (134.199.154.244) making two short, clean SSH probes right after cloud-init finished: ``` Aug 10 17:12:38 ... sshd[1084]: Accepted publickey for root from 134.199.154.244 port 58680 ssh2: ED25519 SHA256:tTlbTNst+AtF13f69h9w+SozJIumFspCgL7wcOTbmQQ Aug 10 17:12:39 ... sshd[1084]: Received disconnect from 134.199.154.244 port 58680:11: disconnected by user Aug 10 17:12:52 ... sshd[1391]: Accepted publickey for root from 134.199.154.244 port 49922 ssh2: ED25519 SHA256:tTlbTNst+AtF13f69h9w+SozJIumFspCgL7wcOTbmQQ Aug 10 17:12:52 ... sshd[1391]: Received disconnect from 134.199.154.244 port 49922:11: disconnected by user ``` Then, after a ~2m23s quiet gap, the same source IP starts hammering sshd with a new connection every 1-4s that never completes authentication — 180 of these between 17:15:15 and 17:19:07: ``` Aug 10 17:15:15 ... sshd[7602]: Connection closed by authenticating user root 134.199.154.244 port 51956 [preauth] Aug 10 17:15:16 ... sshd[7604]: Connection closed by authenticating user root 134.199.154.244 port 51970 [preauth] ... (178 more, same shape, same source IP, ~1-4s apart) ... Aug 10 17:19:07 ... sshd[7966]: Connection closed by authenticating user root 134.199.154.244 port 58916 [preauth] Aug 10 17:19:08 ... sshd[7970]: Accepted publickey for root from 134.199.154.244 port 58938 ssh2: ED25519 SHA256:tTlbTNst+AtF13f69h9w+SozJIumFspCgL7wcOTbmQQ ``` The droplet itself never rebooted in between (no new boot/cloud-init sequence anywhere in the journal after 17:13:26) and never logs anything about nix/clan/enroll work — whatever is looping is on the harness/host side, not something the droplet is waiting on. ## Suspected layer **Product** — the own-VPS `enroll-configure` leg. This is exactly the code most recently touched: `f989696 enroll-configure generates the gateway's vars before the eval preflight`, `eabd46b own-VPS gateway seed sets nixpkgs.hostPlatform`, `80b25e6 own-VPS gateway seed flake must nix-eval`. The signature — one connection that authenticates and disconnects cleanly (twice), then a quiet gap consistent with local vars-generation/eval work, then a 4-minute burst of same-IP connections that all die during `[preauth]` — reads as the eval-preflight/deploy step reopening SSH (plausibly several at once, e.g. for a parallel store-path copy) faster than sshd can complete them, cascading into a retry loop that never recovers inside the 360s leg budget. This is **not** the known own-VPS pairing frontier ("pairing never flips") — that's a different failure shape, and this run's `artifacts/legs.json` is empty (`[]`) so there's no skip reason recorded to confirm or rule it out either way. ## Gaps in this run's own evidence - `artifacts/legs.json` is `[]` and `artifacts/journey.json` has `rows: null, fault: null` — the harness's own per-leg instrumentation recorded nothing for this run. - `logs/helper.log` and `logs/reporter-claude.err` are both empty — no host-side helper/reporter trace survives to corroborate what the eval-preflight step was doing during the quiet or hammering windows. - `logs/guest-*.log` are all empty and `artifacts/host.json` shows `qemu: exit ENOENT: spawn qemu-system-x86_64 ENOENT` — expected and irrelevant here, since this is an own-VPS drive with no local qemu guest. ## What plugging it needs Trace what `enroll-configure`'s eval-preflight/machine-vars stage does with its SSH connection(s) after the first two clean probes at 17:12:38/17:12:52 — specifically whether it opens a fresh SSH connection per check/copy instead of reusing one (ControlMaster/multiplexing), and whether it backs off after a `[preauth]` failure or immediately retries. Fixing the reconnect strategy (reuse one connection, add backoff) should stop the 4-minute stall and let the leg clear inside its 360s budget. Also worth a follow-up: `legs.json`/`journey.json`/`helper.log` being empty on a run that got far enough to found the community (`state/founding-state.json` shows `founded: true`) suggests the instrumentation itself has a gap worth closing so the next red run leaves a fuller trail. drive `20260810T171130Z` red at `wizard`: `drive red at wizard — the wizard died before any leg ran` evidence: `test-results/…/20260810T171130Z/` on matou-workstation (legs.json, droplet-journal.txt, trace) <!-- rehearsal-sig: dcf630511b50 -->
Author
Owner

Blocked on a judgement call — needs a human decision (asked via Mattermost, no reply within the 20-min window).

This issue and the already-merged #407 are two auto-filed rehearsal reports for the same red drive (20260810T171130Z, budget of 360s elapsed at "enroll-configure"). #407 already remediated it by widening the droplet enroll-configure ceiling to 20m (commit 7cc95f6), on the diagnosis that the leg was doing legitimate first-time uncached gateway-closure work and merely hit a too-tight 6m ceiling inherited verbatim from the warm-store local-guest table.

#406's competing theory is a product-side SSH reconnect-loop bug (the 180 rapid preauth-dying SSH connections in droplet-journal.txt) and asks to make enroll-configure "reuse one connection (ControlMaster/multiplexing)" or "add backoff". I traced this and there is no product seam to fix:

  • The only SSH-options code we own for the deploy — sshNGStore → NIX_SSHOPTS used by nix copy, plus the build/copy stages — returns early for FullInstall (the droplet path), internal/clan/enrollment.go:540. So the droplet takeover never touches it.
  • There is no SSH-option / ControlMaster passthrough to clan machines install. The install SSH (kexec → disko → install → reboot, plus nixos-anywhere's own closure copy over SSH) runs entirely inside the external pinned nixos-anywhere/clan tool. We only pass --target-host / --host-key-check none / --build-on local / --update-hardware-config nixos-facter / --yes (installArgs, enrollment.go:706).

So the 180-connection storm lives inside the external takeover tool during a first-time uncached droplet takeover (its wait-for-ssh across kexec/reboot phases and its own store-path copy) — expected takeover behaviour, not a loop in code we own — and #407 already widened the ceiling to absorb it. The issue itself also admits its own instrumentation recorded nothing for this run (legs.json [], helper.log/reporter-claude.err empty), so its "Product" attribution is unconfirmed.

Decision needed (pick one):

  • (A) — recommended. Close #406 as a misdiagnosis already remediated by #407. No product change: the SSH churn is nixos-anywhere's own takeover behaviour, now inside the 20m ceiling. If a future green droplet drive establishes the real enroll-configure cost, the ceiling tightens from evidence (per the in-code "budgets are ceilings" ruling).
  • (B). Invest in a real change: pass SSH connection-multiplexing options through to nixos-anywhere / clan machines install (spikier — touches the pinned tool's flags/env, and needs a clan-lab to verify it actually collapses the storm and does not break the takeover). If so, re-arm this as a spike with ready-for-agent.

To re-arm: resolve the decision above, then swap ready-for-human back to ready-for-agent (for B, note "scope as a spike" in a comment). A late Mattermost reply is not lost — the next ask for #406 resumes the same thread.

**Blocked on a judgement call — needs a human decision (asked via Mattermost, no reply within the 20-min window).** This issue and the already-merged **#407** are two auto-filed rehearsal reports for the **same** red drive (`20260810T171130Z`, `budget of 360s elapsed at "enroll-configure"`). #407 already remediated it by **widening the droplet enroll-configure ceiling to 20m** (commit `7cc95f6`), on the diagnosis that the leg was doing legitimate first-time *uncached* gateway-closure work and merely hit a too-tight 6m ceiling inherited verbatim from the warm-store local-guest table. #406's competing theory is a **product-side SSH reconnect-loop bug** (the 180 rapid preauth-dying SSH connections in `droplet-journal.txt`) and asks to make enroll-configure "reuse one connection (ControlMaster/multiplexing)" or "add backoff". I traced this and **there is no product seam to fix**: - The only SSH-options code we own for the deploy — `sshNGStore` → `NIX_SSHOPTS` used by `nix copy`, plus the `build`/`copy` stages — **returns early for `FullInstall`** (the droplet path), `internal/clan/enrollment.go:540`. So the droplet takeover never touches it. - There is **no SSH-option / ControlMaster passthrough** to `clan machines install`. The install SSH (kexec → disko → install → reboot, plus nixos-anywhere's own closure copy over SSH) runs entirely inside the external pinned nixos-anywhere/clan tool. We only pass `--target-host` / `--host-key-check none` / `--build-on local` / `--update-hardware-config nixos-facter` / `--yes` (`installArgs`, enrollment.go:706). So the 180-connection storm lives **inside the external takeover tool** during a first-time uncached droplet takeover (its wait-for-ssh across kexec/reboot phases and its own store-path copy) — expected takeover behaviour, not a loop in code we own — and #407 already widened the ceiling to absorb it. The issue itself also admits its own instrumentation recorded nothing for this run (`legs.json` `[]`, `helper.log`/`reporter-claude.err` empty), so its "Product" attribution is unconfirmed. **Decision needed (pick one):** - **(A) — recommended.** Close #406 as a misdiagnosis already remediated by #407. No product change: the SSH churn is nixos-anywhere's own takeover behaviour, now inside the 20m ceiling. If a future *green* droplet drive establishes the real enroll-configure cost, the ceiling tightens from evidence (per the in-code "budgets are ceilings" ruling). - **(B).** Invest in a real change: pass SSH connection-multiplexing options **through** to nixos-anywhere / `clan machines install` (spikier — touches the pinned tool's flags/env, and needs a `clan-lab` to verify it actually collapses the storm and does not break the takeover). If so, re-arm this as a **spike** with `ready-for-agent`. To re-arm: resolve the decision above, then swap `ready-for-human` back to `ready-for-agent` (for B, note "scope as a spike" in a comment). A late Mattermost reply is not lost — the next ask for #406 resumes the same thread.
Author
Owner

Ben rules (A): closed as remediated by #407's 20m ceiling (7cc95f6). The re-drive is the experiment — if the SSH churn is nixos-anywhere's normal takeover behaviour it now fits the ceiling; if the drive reds again at enroll-configure parked at 8% with the same preauth-storm signature, that run's 20 minutes of evidence re-opens the product question (note for that case: during THIS run's storm the droplet was still un-kexec'd Ubuntu with a working sshd accepting our key, so pure wait-across-kexec doesn't fully explain it — host-key polling pre-kexec is the other candidate).

Ben rules **(A)**: closed as remediated by #407's 20m ceiling (`7cc95f6`). The re-drive is the experiment — if the SSH churn is nixos-anywhere's normal takeover behaviour it now fits the ceiling; if the drive reds again at enroll-configure parked at 8% with the same preauth-storm signature, that run's 20 minutes of evidence re-opens the product question (note for that case: during THIS run's storm the droplet was still un-kexec'd Ubuntu with a working sshd accepting our key, so pure wait-across-kexec doesn't fully explain it — host-key polling pre-kexec is the other candidate).
ben closed this issue 2026-08-10 18:02:11 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#406
No description provided.