deploy-takeover cannot prove the takeover landed: the post-deploy dial uses a key the box no longer trusts, and active fires while it is still pulling the closure #1099
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#1099
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
deploy-takeoverred on drive20260901T030011Z(sig800a2936720b) after 1,025,160 ms. The leg's message was a mis-worded ssh denial (repaired in commitd712290a), but underneath it the leg still has no way to prove the takeover landed — and the run's evidence shows two concrete reasons why.Evidence
1. The takeover's kexec phase was reaped mid-flight.
test-results/drive-device/20260901T030011Z/logs/gateway-journal.txt:1680, 04:24:02Z:That is
runInstallWatched(internal/clan/enrollment.go:2294-2350) firing after 9 x 20s = 180s of darkness (constants atinternal/clan/enrollment.go:149-150) on the MESH address the takeover deploys over — the address its own kexec phase destroys by construction. The #1068 re-point (internal/clan/enrollment.go:986-1000) then carried the post-kexec phases on, so notarget_lostfault ever reached the UI.2. The box was still pulling a closure when the leg asserted.
logs/device-do-forensics.txt, hypervisor-side inbound Mbps (this series outlives the box):The device was receiving at 12-24 Mbps through the moment the leg asserted
/etc/NIXOS(~04:29:30Z) and past the end of the run.3. The
activegate fired anyway.waitForDeployActive(app/tests/e2e/fixtures/provision.ts:280-346) returned without throwing — no[data-field="deploy-failure"], no[data-status="setup-error"].ActiveScreenis gated only ondeployRun.outcomeplus per-service health (dashboard/src/components/provisioning/SetupSurface.vue:56-64), andlogs/gateway-journal.txtrecords at 04:29:08Z:service health probe … service=files node=node-req-0003 attempt=1 attempts=36 verdict=healthy. One healthy probe, on attempt 1 of 36, while the box was at 18-24 Mbps inbound.4. The drive can no longer authenticate to the device at all.
The same ambient-key dial worked at 04:11 —
artifacts/join-transcript.txtshows the join one-liner running over it and printing✓ community trust installed/✓ takeover staged. By 04:29-04:31 every dial is turned away:logs/device-journal.txt,device-stall.txt,device-units.txtanddevice-caddy.txtall takeroot@170.64.223.130: Permission denied (publickey,password,keyboard-interactive), anddevice-keri.txttakesConnection closed by 170.64.223.130 port 22— on a box thatlogs/device-do-forensics.txtproves is up (tcp/22: a FRESH connect succeeded, 3/3 ping replies).The device journey's dials are ambient-key BY DESIGN (
app/tests/e2e/fixtures/droplet.ts:33-35), but a box under community trust carries only the enrolled keys, withPermitRootLogin = "prohibit-password"(renderAccess,internal/clan/enrollment.go:775-793). So the leg's proof-of-NixOS is unobtainable on a SUCCESSFUL takeover too — which is exactly why this run's verdict is undecidable, and why the wholedevice-*.txtforensic harvest came back empty at the one leg that needed it.One suggestive tell, not proof: the broker dial in this same run was denied
Permission denied (publickey).— a single method, the hardened shape. The device offeredpublickey,password,keyboard-interactive, the DO Ubuntu-24.04 image shape. That leans toward the box never having left Ubuntu, but the kexec installer image's own sshd posture was never captured, so it does not settle it.Suspected layer
Two, and this run cannot separate them, because no post-takeover evidence could be gathered off the box at all:
app/tests/e2e/journey.device.spec.ts:696-720andoc_device_evidence(scripts/lib/rehearsal-droplet.sh:1517-1549) both dial a taken-over device with an identity it is no longer guaranteed to trust.runInstallWatched's liveness reap treats the mesh address's expected disappearance as darkness, and theactiveverdict does not wait for the takeover's own landing.What plugging it needs
scripts/lib/rehearsal-droplet.sh:533-547) for the device label inoc_device_evidence(scripts/lib/rehearsal-droplet.sh:1546, currently bareoc_droplet_evidence "$run_dir" device), and forjourney.device.spec.ts's post-takeover dials. Decide which key a taken-over member actually trusts — the enrolled keysrenderAccesslands — and hand the drive that one.sshDropletalready takes anidentityFile(app/tests/e2e/fixtures/droplet.ts:58); nothing new is needed at the dial.activescreen — or makeactivewait for it. As it stands a single healthyfilesprobe at 04:29:08Z was enough to declare a box active while it was mid-install.internal/clan/enrollment.go:2294-2350).The leg's message now names the dial, its exit code and its stderr (commit
d712290a), so the next drive's red will already say which of these it hit — but it will still red, which is why this blocks.drive
20260901T030011Zred atdeploy-takeover:the device is not NixOS after the takeover (/etc/NIXOS absent): ""evidence:
/home/swarm/swarm/Matou/idss/test-results/drive-device/20260901T030011Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedswarm-claim host=matou-dev-server-01 run=15621
(automated multi-host claim — lowest live claim id works this ticket)
Live session evidence gathered off the gateway while the run's box was still up — it settles the one question this report explicitly leaves open, and it is not in the artifacts (the harvest dials the device's public IP, which is exactly the channel that fails).
The box DID leave Ubuntu — the "suggestive tell" is misleading
The report's tell (
publickey,password,keyboard-interactive= "the DO Ubuntu-24.04 image shape") leans the wrong way. Read off the gateway at 04:31Z and again at 04:34Z (netbird-mesh status -d, via the rent-operator key):A
nixos-installerpeer registered with the management plane ~10 minutes after the device peer. An Ubuntu box that never kexec'd cannot produce that peer. So the kexec ran and the installer image came up and joined — consistent with the report's own04:24:02Zreap-mid-kexec line and with the 12–24 Mbps inbound at 04:24–04:30 (the installer pulling its closure). The sshd posture at 04:29 is the installer's, not proof of a still-Ubuntu box.What did NOT happen: the mesh never carried a byte
Both peers, ten and three minutes into their registrations:
Status: Connecting,Last WireGuard handshake: -,0 B/0 B, andRelay server address:empty. From the gateway, over the mesh, at 04:34Z:Registration is not connectivity. The takeover deploys over that address (
root@100.77.179.41in the reaped-phase line), so on this run the post-kexec phases had no working channel to carry, whatever the #1068 re-point pointed them at. Whether the mesh was up earlier in the run and died at the kexec boundary, or never handshook at all, is the question I could not settle from outside — but0 B/0 Bon the device peer, which had been registered 13 minutes and predates the kexec, says no traffic ever crossed it.That makes a third candidate layer, beside the two named:
On the harness half — the assertion can never pass
Agreed and worth stating sharply:
test -e /etc/NIXOSover an ambient-key dial to the public IP is unobtainable on a successful takeover, because a box under community trust carries only enrolled keys withPermitRootLogin = "prohibit-password". A green cannot be produced by that probe. Whatever else is fixed, the proof-of-landing needs a channel that survives community trust — the enrolled deploy key, or the gateway's own view over the mesh — and theactivegate needs to mean "the install finished", not "one health probe answered on attempt 1 of 36 while the box pulls at 24 Mbps".Forensics window
The device droplet was destroyed at ~04:46Z, so nothing further can be read off it. If a future run reaches this leg red, capturing
netbird-mesh status -dfrom the gateway before teardown is the highest-value artifact — it is the only place the installer/device peer distinction and the handshake state are visible, and it costs one ssh.(Session note, ADR 0174: evidence only, no code change from me on this ticket — the fix is the worker's, and the three layers now have a way to be told apart.)
Ruled by agent under ADR 0174 — veto anytime.
Two decisions this ticket needed, both two-way doors (revertible by a later commit, provable by the next drive, no one-way-door residue — nothing on the personal-credential / security-widening / trust-accept / data-destruction / spend list):
1. Which key a taken-over member trusts, and how the drive reaches it. Tracing
internal/provision/takeover.go, a full-install takeover bakes into the re-imaged host'saccess.nixexactlyreq.AuthorizedKeys, ando.deployKeyssets that to the gateway control plane's own deploy key (/root/.ssh/id_ed25519, minted by idss-self-trust — the key baked reachable so the box answers the enroll-activate reconnect, #1007/#414), withPermitRootLogin = prohibit-password. So the enrolled box trusts neither the operator's ambient key nor any identity the executor workstation holds — the private half lives on the gateway. The ticket's hint ("hand the drive that one file; nothing new is needed at the dial") assumed the key was handable; it is not.Ruling: relay through the standing gateway rather than exfiltrate a root private key to the workstation. The outer ssh reaches the gateway over the per-run rent-operator key (the same key the gateway harvest already uses); the gateway's OWN ssh carries the command the last hop to
root@<device>over the key it deploys the device with. No key leaves the gateway; the gateway presents the trust it was built to present. Why two-way: pure harness code (sshDeviceViaGateway/waitForDeviceNixOSindroplet.ts; opt-inOC_EVIDENCE_RELAY_VIAinrehearsal-droplet.sh— direct mode byte-identical for the rented/create-trap paths). Proven offline bydroplet.test.ts(relay argv + relay-fault decidability) anddevice-evidence-order-test.sh(relay routes through the gateway; default harvest never relays), and by the next drive reachingdeploy-takeovergreen.2. The proof's timing, and the 180 s #1013 dark streak. The
activescreen fired on a singlefileshealth probe (attempt 1 of 36) while the box was still pulling the closure at 18-24 Mbps and was not yet NixOS. Ruling: gate the proof-of-NixOS on the box's OWN state (waitForDeviceNixOSpolls/etc/NIXOSuntil genuinely present, tolerating a box still rebooting through its kexec), not on the UI's active screen.The 180 s dark streak (
runInstallWatched) is left unchanged: a mesh takeover's kexec does destroy the very address it probes, but the #1068 re-point already recovers a spurious kexec-phase reap (the run log shows exactly this — reap at 04:24:02Z, phases carried on), and widening the streak would slow every genuinely-vanished target's honest reap. The drive's undecidability was the wrong key + the early active-gate (decisions 1 & 2), not the streak. A Go timing constant is not offline-provable, so the conservative no-change call stands; reopen if a future mesh-takeover drive shows the re-point failing to recover.The live drive is the final arbiter (standard for healer tickets); it will now red decidably (naming the relay hop or "still not NixOS after Ns") or go green.
close-report for #1099 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope