Device drive 20260831T113210Z red at deploy-takeover: the #1068 re-point held and the install LANDED, but the installed member is off the mesh so verify can never reconnect (#1069, live proof) #1070

Closed
opened 2026-08-31 13:10:17 +00:00 by matou-build-agent · 2 comments

Failure

Drive 20260831T113210Z (target device, commit 03fb43cf), 26/27 legs green, red at deploy-takeover after 1311431 ms (21m51s):

deploy failed (resume): the takeover of node-req-0003 stopped: the node has not come back yet — wait for the reboot to finish, then re-drive to verify

artifacts/verdict.json — firstRedLeg: deploy-takeover; artifacts/legs.json:27. The message is wrong about the box: node-req-0003 did come back, re-imaged and healthy. What never came back is the address. This is #1069 — predicted in code by internal/provision/takeover.go:165-172 — now proven on a paid drive.

What actually happened

#1068's re-point held. This is the first drive to get past the kexec.

  1. logs/gateway-journal.txt:1943 — 12:51:44, the #1013 liveness reap fires on the dead pre-kexec target root@100.86.205.31 (internal/clan/enrollment.go:2103).
  2. logs/gateway-journal.txt:1919-1932 — 12:49:20/12:49:21, a new mesh peer ttaf2k67Kmp3jclpgNu8XaMcOB9+rWEqMXZThVLfL1g= logs in to netbird-mgmt and connects (configure WireGuard endpoint to: 10.126.0.5:51820). That is the kexec installer rejoining, exactly as #1068 designed. repointToRejoinedInstaller (internal/clan/enrollment.go:866) resolved it and re-pointed snap.Target.
  3. The post-kexec phases then really ran against the re-pointed address: logs/gateway-do-forensics.txt gateway outbound 14.0 → 11.3 → 10.9 → 10.4 Mbps across 12:52–12:58, matched by logs/device-do-forensics.txt device inbound 8.9 → 22.6 → 22.5 → 21.8 → 21.8 Mbps across 12:50–13:00, collapsing to 0.39 at 13:02. That is the disko/install closure copy, start to finish.
  4. Reaching verify at all proves every install phase completed. Advance (internal/clan/enrollment.go:429-435) only enters StageVerify when install() returns without setting Failure/Blocked; the fault text is blockedRemedyInstruction(FullInstall) (internal/clan/enrollment.go:1565-1567), reachable from exactly one place — verify's concession at internal/clan/enrollment.go:1418. So kexec · disko · install · reboot all landed.
  5. The box is up and re-imaged. logs/device-do-forensics.txt: 3 packets transmitted, 3 received, 0% packet loss and tcp/22: a FRESH connect succeeded — the box answers. Every device harvest nonetheless fails root@168.144.163.41: Permission denied (publickey,password,keyboard-interactive) (logs/device-journal.txt, device-units.txt, device-stall.txt, device-caddy.txt). That denial is the success signal: the installed NixOS bakes only the control plane's deploy key into root trust (internal/provision/takeover.go:186-200), so the drive host's own key is correctly refused. Pre-takeover Ubuntu accepted it.
  6. And it is off the mesh — permanently. The pre-kexec device peer FsEUbDj/EJCpTtIv8gWVknA0G7ERuZkoNoGMU5Ejhn4= disconnects at 12:49:03 (gateway-journal.txt:1912) and then sends unanswered offers (serial: 5348c39386) every ~30s straight through 13:02:35 — it never returns. No third peer ever logs in: ttaf2k67… (12:49:21) is the last mesh login in the entire journal.

So verify ran clan machines update --target-host root@<installer IP2> (internal/clan/enrollment.go:1293-1296) against an address that died with the installer, spent its reconnect budget (defaultReconnectWindow, enrollment.go:159), and conceded the resumable block at enrollment.go:1418 at 13:01:14 (gateway-journal.txt:1988).

Suspected layer

Not a bug in #1068's fix — that worked. The layer is member node composition: an installed member renders no netbird module at all. internal/clan/member_attach.go:33 — baseMemberModules = []string{"networking.nix", "disko.nix", PlatformFileName, AccessFileName}; the netbird client and the mesh self-admit oneshot are gateway-only (internal/clan/netbird.go, wired from vmguest.go). internal/provision/takeover.go:165-172 already records this as code-proven.

Two addresses go stale at the same instant, not one:

  • snap.Target — the installer IP2 the #1068 re-point left behind; kills the takeover's own verify (this red).
  • d.MeshAddress — the landing IP1 the front door's member-device files route still points at (deploy.go).

Secondary honesty defect (same root, worth naming)

The fault the operator sees is actively misleading and self-perpetuating: recovery.mode: "resume" with "wait for the reboot to finish, then re-drive to verify" (trace resource 2a0a85da5b29f7a4a4bd98e0df5affd35c31403d.json). The reboot has finished; a re-drive resumes into the identical dead address and burns another droplet plus ~22 minutes. Until the ruling below lands, this red should not present as a resumable block.

What plugging it needs

A mesh-admission ruling on how an installed member device rejoins the community mesh — a member self-admit module plus a key-mint mechanism. The only obvious candidate (a standing node-scoped key persisted into the config repo) is the same security-posture widening that #1068's option B was rejected on: a one-way door under ADR 0174, validatable only by a live drive past the kexec. #1069 was already re-scoped and routed ready-for-human on this exact basis in 102beb16; this drive supplies the live evidence that was missing.

Block the device drive on this. It is now deterministic: every re-drive gets through the kexec (thanks to #1057/#1068), re-images the droplet, and then reds identically at verify for the ~22 minutes it takes to spend the reconnect budget.

Evidence absent from this run

No droplet-journal.txt (the run carries logs/gateway-journal.txt plus a logs/device-journal.txt that is only the SSH-denial stub — the installed device could not be harvested, by design, see point 5). logs/founding-state.log covers the gateway founding only, not the device takeover. logs/state-logs.log records ENOENT on standing-rented/state/logs. The enrollment's own phase events ("kexec complete — the installer rejoined the mesh at …", enrollment.go:880) are emitted to the event channel, not the journal, and the Playwright trace never fetched the takeover log stream — so the re-point is established from the mesh login, the transfer profile, and the state machine's own reachability of verify, all cited above, rather than from a direct log line.

drive 20260831T113210Z red at deploy-takeover: deploy failed (resume): the takeover of node-req-0003 stopped: the node has not come back yet — wait for the reboot to finish, then re-drive to verify
evidence: /home/swarm/swarm/Matou/idss/test-results/drive-device/20260831T113210Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## Failure Drive `20260831T113210Z` (target `device`, commit `03fb43cf`), 26/27 legs green, red at `deploy-takeover` after 1311431 ms (21m51s): > deploy failed (resume): the takeover of node-req-0003 stopped: the node has not come back yet — wait for the reboot to finish, then re-drive to verify `artifacts/verdict.json` — `firstRedLeg: deploy-takeover`; `artifacts/legs.json:27`. The message is **wrong about the box**: node-req-0003 *did* come back, re-imaged and healthy. What never came back is the **address**. This is `#1069` — predicted in code by `internal/provision/takeover.go:165-172` — now proven on a paid drive. ## What actually happened **#1068's re-point held.** This is the first drive to get past the kexec. 1. `logs/gateway-journal.txt:1943` — 12:51:44, the #1013 liveness reap fires on the dead pre-kexec target `root@100.86.205.31` (`internal/clan/enrollment.go:2103`). 2. `logs/gateway-journal.txt:1919-1932` — 12:49:20/12:49:21, a **new** mesh peer `ttaf2k67Kmp3jclpgNu8XaMcOB9+rWEqMXZThVLfL1g=` logs in to `netbird-mgmt` and connects (`configure WireGuard endpoint to: 10.126.0.5:51820`). That is the kexec installer rejoining, exactly as `#1068` designed. `repointToRejoinedInstaller` (`internal/clan/enrollment.go:866`) resolved it and re-pointed `snap.Target`. 3. The post-kexec phases then really ran against the re-pointed address: `logs/gateway-do-forensics.txt` gateway **outbound** 14.0 → 11.3 → 10.9 → 10.4 Mbps across 12:52–12:58, matched by `logs/device-do-forensics.txt` device **inbound** 8.9 → 22.6 → 22.5 → 21.8 → 21.8 Mbps across 12:50–13:00, collapsing to 0.39 at 13:02. That is the disko/install closure copy, start to finish. 4. **Reaching `verify` at all proves every install phase completed.** `Advance` (`internal/clan/enrollment.go:429-435`) only enters `StageVerify` when `install()` returns without setting `Failure`/`Blocked`; the fault text is `blockedRemedyInstruction(FullInstall)` (`internal/clan/enrollment.go:1565-1567`), reachable from exactly one place — `verify`'s concession at `internal/clan/enrollment.go:1418`. So kexec · disko · install · reboot all landed. 5. **The box is up and re-imaged.** `logs/device-do-forensics.txt`: `3 packets transmitted, 3 received, 0% packet loss` and `tcp/22: a FRESH connect succeeded — the box answers`. Every device harvest nonetheless fails `root@168.144.163.41: Permission denied (publickey,password,keyboard-interactive)` (`logs/device-journal.txt`, `device-units.txt`, `device-stall.txt`, `device-caddy.txt`). That denial *is* the success signal: the installed NixOS bakes only the control plane's deploy key into root trust (`internal/provision/takeover.go:186-200`), so the drive host's own key is correctly refused. Pre-takeover Ubuntu accepted it. 6. **And it is off the mesh — permanently.** The pre-kexec device peer `FsEUbDj/EJCpTtIv8gWVknA0G7ERuZkoNoGMU5Ejhn4=` disconnects at 12:49:03 (`gateway-journal.txt:1912`) and then sends unanswered offers (`serial: 5348c39386`) every ~30s straight through 13:02:35 — it never returns. **No third peer ever logs in**: `ttaf2k67…` (12:49:21) is the last mesh login in the entire journal. So `verify` ran `clan machines update --target-host root@<installer IP2>` (`internal/clan/enrollment.go:1293-1296`) against an address that died with the installer, spent its reconnect budget (`defaultReconnectWindow`, `enrollment.go:159`), and conceded the resumable block at `enrollment.go:1418` at 13:01:14 (`gateway-journal.txt:1988`). ## Suspected layer Not a bug in `#1068`'s fix — that worked. The layer is **member node composition**: an installed member renders no netbird module at all. `internal/clan/member_attach.go:33` — `baseMemberModules = []string{"networking.nix", "disko.nix", PlatformFileName, AccessFileName}`; the netbird client and the mesh self-admit oneshot are gateway-only (`internal/clan/netbird.go`, wired from `vmguest.go`). `internal/provision/takeover.go:165-172` already records this as code-proven. Two addresses go stale at the same instant, not one: - `snap.Target` — the installer IP2 the #1068 re-point left behind; kills the takeover's own `verify` (this red). - `d.MeshAddress` — the landing IP1 the front door's member-device files route still points at (`deploy.go`). ## Secondary honesty defect (same root, worth naming) The fault the operator sees is actively misleading and self-perpetuating: `recovery.mode: "resume"` with *"wait for the reboot to finish, then re-drive to verify"* (trace resource `2a0a85da5b29f7a4a4bd98e0df5affd35c31403d.json`). The reboot **has** finished; a re-drive resumes into the identical dead address and burns another droplet plus ~22 minutes. Until the ruling below lands, this red should not present as a resumable block. ## What plugging it needs A **mesh-admission ruling** on how an installed member device rejoins the community mesh — a member self-admit module plus a key-mint mechanism. The only obvious candidate (a standing node-scoped key persisted into the config repo) is the same security-posture widening that `#1068`'s option B was rejected on: a one-way door under ADR 0174, validatable only by a live drive past the kexec. `#1069` was already re-scoped and routed `ready-for-human` on this exact basis in `102beb16`; this drive supplies the live evidence that was missing. **Block the device drive on this.** It is now deterministic: every re-drive gets through the kexec (thanks to #1057/#1068), re-images the droplet, and then reds identically at `verify` for the ~22 minutes it takes to spend the reconnect budget. ## Evidence absent from this run No `droplet-journal.txt` (the run carries `logs/gateway-journal.txt` plus a `logs/device-journal.txt` that is only the SSH-denial stub — the installed device could not be harvested, by design, see point 5). `logs/founding-state.log` covers the gateway founding only, not the device takeover. `logs/state-logs.log` records `ENOENT` on `standing-rented/state/logs`. The enrollment's own phase events (`"kexec complete — the installer rejoined the mesh at …"`, `enrollment.go:880`) are emitted to the event channel, not the journal, and the Playwright trace never fetched the takeover log stream — so the re-point is established from the mesh login, the transfer profile, and the state machine's own reachability of `verify`, all cited above, rather than from a direct log line. drive `20260831T113210Z` red at `deploy-takeover`: `deploy failed (resume): the takeover of node-req-0003 stopped: the node has not come back yet — wait for the reboot to finish, then re-drive to verify` evidence: `/home/swarm/swarm/Matou/idss/test-results/drive-device/20260831T113210Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: 800a2936720b -->
Author
Member

Ruled by agent under ADR 0174 — veto anytime

This ticket is the live proof of #1069, and it carried one landable two-way part (the honesty defect it names). Both are now handled; closing.

What this ticket established (proof captured)

The drive's forensics confirm #1069's code-proven premise on a paid drive: #1068's re-point held (first drive past the kexec), the install LANDED (reaching verify proves kexec·disko·install·reboot all completed), and the installed member is off the mesh (renders no netbird module → rejoins at no address; box answers a fresh ssh connect but correctly refuses the drive host's key; no third mesh peer ever logs in). This evidence is mirrored onto #1069, which holds the ready-for-human one-way mesh-admission ruling that actually plugs the gap.

Two-way honesty fix — LANDED (46bd4a7a)

The secondary defect this ticket named: the red presented as a misleading resumable recovery.mode: "resume" / "wait for the reboot to finish, then re-drive to verify" — but the reboot has finished and a re-drive resumes into the same dead address for the identical red (~22m + a droplet).

deployTakeover (member-device-only — gateway founding uses internal/founding with its own resumable handling) now re-classifies a StageVerify block to a NON-resumable rescue-mode fault that names the member mesh-admission ruling (#1069) it waits on, and persists no resumable snapshot. It reverts when #1069 lands a member self-admit + key-mint.

  • Red-first TestDeploy_AMemberOffMeshVerifyBlockIsNotResumable (internal/provision/takeover_test.go) + new clantesting.FakeConfig.VerifyBlocks lever. Proven red before the fix (the block presented Mode:resume with the verbatim misleading remedy), green after.
  • go test ./internal/provision ./internal/clan + go build ./... + go vet + gofmt green. STATUS.md updated in the same commit.

Device drive re-pointed (so this close doesn't re-open the burn)

#854 was blocked by this proof ticket; it is now blocked by #1069 (the real one-way-door blocker) and the stale #1070 edge removed. #854's only open blocker is now #1069, so closing #1070 does not un-gate the deterministic re-drive burn.

Why this is a two-way door

A revertible, member-only recovery re-classification proven at the offline provision seam; no trust surface touched (an off-mesh member still fails loud). The one-way mesh-admission ruling stays on #1069. Not on the one-way-door list.

Closing as done — proof captured (mirrored to #1069), honesty fix landed and tested, device drive re-pointed.

## Ruled by agent under ADR 0174 — veto anytime This ticket is the **live proof of #1069**, and it carried one landable two-way part (the honesty defect it names). Both are now handled; closing. ### What this ticket established (proof captured) The drive's forensics confirm #1069's code-proven premise on a paid drive: #1068's re-point held (first drive past the kexec), the install LANDED (reaching `verify` proves kexec·disko·install·reboot all completed), and the installed member is **off the mesh** (renders no netbird module → rejoins at no address; box answers a fresh ssh connect but correctly refuses the drive host's key; no third mesh peer ever logs in). This evidence is mirrored onto **#1069**, which holds the `ready-for-human` one-way mesh-admission ruling that actually plugs the gap. ### Two-way honesty fix — LANDED (`46bd4a7a`) The secondary defect this ticket named: the red presented as a misleading resumable `recovery.mode: "resume"` / *"wait for the reboot to finish, then re-drive to verify"* — but the reboot has finished and a re-drive resumes into the same dead address for the identical red (~22m + a droplet). `deployTakeover` (member-device-only — gateway founding uses `internal/founding` with its own resumable handling) now re-classifies a `StageVerify` block to a **NON-resumable** rescue-mode fault that names the member mesh-admission ruling (#1069) it waits on, and persists no resumable snapshot. It reverts when #1069 lands a member self-admit + key-mint. - Red-first `TestDeploy_AMemberOffMeshVerifyBlockIsNotResumable` (`internal/provision/takeover_test.go`) + new `clantesting.FakeConfig.VerifyBlocks` lever. Proven red before the fix (the block presented `Mode:resume` with the verbatim misleading remedy), green after. - `go test ./internal/provision ./internal/clan` + `go build ./...` + `go vet` + `gofmt` green. `STATUS.md` updated in the same commit. ### Device drive re-pointed (so this close doesn't re-open the burn) #854 was blocked by **this** proof ticket; it is now blocked by **#1069** (the real one-way-door blocker) and the stale #1070 edge removed. #854's only open blocker is now #1069, so closing #1070 does not un-gate the deterministic re-drive burn. ### Why this is a two-way door A revertible, member-only recovery re-classification proven at the offline provision seam; no trust surface touched (an off-mesh member still fails loud). The one-way mesh-admission ruling stays on #1069. Not on the one-way-door list. Closing as done — proof captured (mirrored to #1069), honesty fix landed and tested, device drive re-pointed.
Owner

Ruled by Ben (via session, 2026-08-31) — option (A): the installed member device carries the installer's mesh identity across the install

Ruling. An installed member device rejoins the community mesh as the same peer the kexec installer already is — no third admission, no standing key, no secret in the config repo. The installer's netbird identity (its WireGuard key + config, the peer netbird-mgmt already admitted at IP2 under #1068) is copied onto the freshly-disko'd disk before install, and the installed member's configuration carries the same netbird client module the gateway has, so on reboot the box comes up on the same wt0 address the post-kexec phases were re-pointed to. verify then reaches it, and that address is what the front door routes files to.

Why A, not B/C. (C) — a standing node-scoped key persisted into the replicated config — is the posture widening #1068's option B was rejected on (ADR 0126: no secret in the config repo). (B) — a third single-use mint dropped on disk — works but yields a third address and a third admission per takeover for no gain. (A) reuses an admission the plane has already granted for exactly this node-, adds no secret anywhere it wasn't already (the installer's state dir is on the box's own disk, same as the gateway's), and is a two-way door: it's one file copy between two phases that already exist.

Scope for the worker:

  1. Member node composition (internal/clan/member_attach.go baseMemberModules): add a member netbird client module rendered with the SAME shape/name as the gateway's peer — services.netbird.clients.mesh = { port = 51820; interface = "wt0"; hardened = false; environment.NB_MANAGEMENT_URL = <the community management URL the installer used, InstallerMesh.ManagementURL>; } — so the state dir (/var/lib/netbird-mesh) and socket match the installer's (post-#1057 renderInstallerMesh). No setup key, no self-admit oneshot on the member: the identity arrives with the state dir. Render-gated on a mesh-addressed takeover, the same predicate as the installer image.
  2. Identity carry-over in enrollment.install (internal/clan/enrollment.go:780), between the disko and install phases (the takeover already drives clan machines install --phases <ph> one phase at a time, enrollment.go:1624): over the re-pointed installer target, mkdir -p /mnt/var/lib && cp -a /var/lib/netbird-mesh /mnt/var/lib/netbird-mesh (mode-preserving; the dir is root-only). Record it in DonePhases/snapshot so a resume never re-copies over an installed system. Fail LOUD if the source dir is absent (an installer that never rejoined has nothing to carry — that is a #1057-class fault, not a silent cold member).
  3. Write the address back: after reboot, resolve the peer by its node group exactly as #1068 does (repointToRejoinedInstaller / ResolveInstallerAddress) and persist it to Device.MeshAddress, so deploy.go's member files route (files.<apex> → <mesh-ip>:80) stops pointing at the dead landing IP1 — this closes #1069's real half.
  4. Honesty defect named in this ticket: while verify cannot reach the box, the fault must not present as recovery.mode: "resume" with "wait for the reboot" — a resume into a dead address burns 22 min and a droplet. With (A) landed the case should not recur; keep the concession text truthful either way.
  5. Tests: member_attach render test proves the member config carries services.netbird.clients.mesh (and NO setup key / self-admit), an enrollment test proves the carry-over step runs once between disko and install with the right paths and is skipped on resume, and the ADR 0209 amendment records this ruling (installed member = installer's peer; #1069's "third address" note closes).
  6. Proof = the next #854 drive: verify green, then files-door/oidc-login (never yet run) get their first shot.

Re-labelling ready-for-session → ready-for-agent; #854 stays parked on this ticket until it lands.

## Ruled by Ben (via session, 2026-08-31) — option **(A): the installed member device carries the installer's mesh identity across the install** **Ruling.** An installed member device rejoins the community mesh as the **same peer the kexec installer already is** — no third admission, no standing key, no secret in the config repo. The installer's netbird identity (its WireGuard key + config, the peer `netbird-mgmt` already admitted at IP2 under #1068) is copied onto the freshly-disko'd disk before `install`, and the installed member's configuration carries the same netbird client module the gateway has, so on reboot the box comes up on the **same wt0 address** the post-kexec phases were re-pointed to. `verify` then reaches it, and that address is what the front door routes files to. **Why A, not B/C.** (C) — a standing node-scoped key persisted into the replicated config — is the posture widening #1068's option B was rejected on (ADR 0126: no secret in the config repo). (B) — a third single-use mint dropped on disk — works but yields a *third* address and a third admission per takeover for no gain. (A) reuses an admission the plane has already granted for exactly this node-<requestID>, adds no secret anywhere it wasn't already (the installer's state dir is on the box's own disk, same as the gateway's), and is a two-way door: it's one file copy between two phases that already exist. **Scope for the worker:** 1. **Member node composition** (`internal/clan/member_attach.go` `baseMemberModules`): add a member netbird client module rendered with the SAME shape/name as the gateway's peer — `services.netbird.clients.mesh = { port = 51820; interface = "wt0"; hardened = false; environment.NB_MANAGEMENT_URL = <the community management URL the installer used, InstallerMesh.ManagementURL>; }` — so the state dir (`/var/lib/netbird-mesh`) and socket match the installer's (post-#1057 `renderInstallerMesh`). **No setup key, no self-admit oneshot** on the member: the identity arrives with the state dir. Render-gated on a mesh-addressed takeover, the same predicate as the installer image. 2. **Identity carry-over** in `enrollment.install` (`internal/clan/enrollment.go:780`), between the `disko` and `install` phases (the takeover already drives `clan machines install --phases <ph>` one phase at a time, `enrollment.go:1624`): over the re-pointed installer target, `mkdir -p /mnt/var/lib && cp -a /var/lib/netbird-mesh /mnt/var/lib/netbird-mesh` (mode-preserving; the dir is root-only). Record it in `DonePhases`/snapshot so a resume never re-copies over an installed system. Fail LOUD if the source dir is absent (an installer that never rejoined has nothing to carry — that is a #1057-class fault, not a silent cold member). 3. **Write the address back:** after `reboot`, resolve the peer by its node group exactly as #1068 does (`repointToRejoinedInstaller` / `ResolveInstallerAddress`) and persist it to `Device.MeshAddress`, so `deploy.go`'s member files route (`files.<apex>` → `<mesh-ip>:80`) stops pointing at the dead landing IP1 — this closes #1069's real half. 4. **Honesty defect** named in this ticket: while `verify` cannot reach the box, the fault must not present as `recovery.mode: "resume"` with "wait for the reboot" — a resume into a dead address burns 22 min and a droplet. With (A) landed the case should not recur; keep the concession text truthful either way. 5. Tests: `member_attach` render test proves the member config carries `services.netbird.clients.mesh` (and NO setup key / self-admit), an enrollment test proves the carry-over step runs once between disko and install with the right paths and is skipped on resume, and the ADR 0209 amendment records this ruling (installed member = installer's peer; #1069's "third address" note closes). 6. Proof = the next #854 drive: `verify` green, then `files-door`/`oidc-login` (never yet run) get their first shot. Re-labelling `ready-for-session` → `ready-for-agent`; #854 stays parked on this ticket until it lands.
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#1070
No description provided.