takeover: the kexec installer bundles the mesh client and a fresh MeshMinter setup key, so wt0 answers through disko/install/reboot (ADR 0209 amendment, #1011 ruled B) #1012

Closed
opened 2026-08-30 02:39:15 +00:00 by ben · 2 comments
Owner

Parent

#1011 (ruled B by Ben, ADR 0209 amendment 2026-08-30, commit 3699e016) · blocks #854.

What to build

The member-device takeover survives its own kexec. At takeover start the gateway mints a fresh single-use setup key through the same MeshMinter port Approve uses (ADR 0214), scoped to the same node identity (node-<requestID>). The kexec installer image carries the netbird client and brings it up with that key at installer boot, so the device reappears at its wt0 address and every phase (kexec, disko, install, reboot) deploys to the one mesh target ADR 0209 rules.

Evidence base: drive 20260830T014530Z (#1011's forensics) — installer boots with no mesh client, gateway offers to a dead peer for the full 20-minute ceiling, disko never runs.

Acceptance criteria

  • A takeover on a mesh-addressed device completes all four phases over wt0; the device journal shows the installer environment's netbird join (a second, installer-phase peer session for node-<requestID>).
  • The installer's setup key is minted at takeover start via the MeshMinter port — single-use, same node identity, never the device's original join key.
  • No public/NetworkFacts.Address fallback is introduced (option A rejected in the amendment — NAT'd devices have none).
  • Offline: render/eval-smoke proves the kexec bundle carries the mesh client and the phase runner passes the minted key into the installer environment.

Blocked by

None — can start immediately.

## Parent #1011 (ruled B by Ben, ADR 0209 amendment 2026-08-30, commit `3699e016`) · blocks #854. ## What to build The member-device takeover survives its own kexec. At takeover start the gateway mints a **fresh single-use setup key** through the same `MeshMinter` port Approve uses (ADR 0214), scoped to the same node identity (`node-<requestID>`). The kexec installer image carries the netbird client and brings it up with that key at installer boot, so the device reappears at its `wt0` address and every phase (`kexec`, `disko`, `install`, `reboot`) deploys to the one mesh target ADR 0209 rules. Evidence base: drive `20260830T014530Z` (#1011's forensics) — installer boots with no mesh client, gateway offers to a dead peer for the full 20-minute ceiling, `disko` never runs. ## Acceptance criteria - [ ] A takeover on a mesh-addressed device completes all four phases over `wt0`; the device journal shows the installer environment's netbird join (a second, installer-phase peer session for `node-<requestID>`). - [ ] The installer's setup key is minted at takeover start via the `MeshMinter` port — single-use, same node identity, never the device's original join key. - [ ] No public/`NetworkFacts.Address` fallback is introduced (option A rejected in the amendment — NAT'd devices have none). - [ ] Offline: render/eval-smoke proves the kexec bundle carries the mesh client and the phase runner passes the minted key into the installer environment. ## Blocked by None — can start immediately.

swarm-claim host=elitebook-distributed-server-03 run=14241
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=14241 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #1012 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 1012,
  "status": "success",
  "commits": [
    "21946b2fd17564d52b0bb7c55b684161465d1d06"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/control-plane/whole_composition.go",
    "internal/clan/adapter.go",
    "internal/clan/clan.go",
    "internal/clan/enrollment.go",
    "internal/clan/installer_mesh_test.go",
    "internal/clan/netbird.go",
    "internal/provision/provision.go",
    "internal/provision/takeover.go",
    "internal/provision/takeover_test.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/clan/ -run InstallerMesh|TakeoverKexec|TakeoverWithoutBuilder -count=1",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/provision/ -run Installer|Mint|NonMesh -count=1",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/clan ./internal/provision ./internal/enroll ./control-plane/cmd/control-plane -count=1",
      "exit_code": 0
    },
    {
      "command": "go build ./... && go vet ./internal/clan/ ./internal/provision/ ./control-plane/cmd/control-plane/",
      "exit_code": 0
    }
  ],
  "criteria": {
    "A takeover on a mesh-addressed device completes all four phases over wt0; the device journal shows the installer environment's netbird join": "LIVE HALF — not provable in an offline sandcastle iteration (no droplet). This slice lands the offline spine acceptance #1 depends on: the mint at takeover start, the InstallerMesh thread into the kexec phase, and installArgs passing --kexec. The live wt0 rejoin needs the PRODUCTION kexec-image builder (clan.WithInstallerImageBuilder) which is filed as #1014 (spike/lab-shaped); the paid drive proof rides it. Until then a mesh takeover mints the key but keeps the stock kexec image (unchanged behaviour, no regression).",
    "The installer's setup key is minted at takeover start via the MeshMinter port — single-use, same node identity, never the device's original join key": "MET — internal/provision/takeover.go runTakeover mints via the new provision.InstallerMeshMinter port (WithInstallerMeshMinter), wired in whole_composition.go over the same enroll.MeshMinter Approve uses, scoped to clan.NodeID(d.ID)=node-<requestID>, and threaded as req.InstallerMesh (a fresh key, never the original join key). Proven by TestDeployTakeover_MintsInstallerMeshKeyForMeshDevice and _RefusesWhenInstallerMintFails.",
    "No public/NetworkFacts.Address fallback is introduced (option A rejected)": "MET — the mint and the render are gated on d.MeshAddress != \"\" only; no NetworkFacts.Address path is added. Proven by TestDeployTakeover_NonMeshDeviceDoesNotMintInstallerKey (a non-mesh device never mints and carries no installer admission).",
    "Offline: render/eval-smoke proves the kexec bundle carries the mesh client and the phase runner passes the minted key into the installer environment": "MET (render + phase-runner half) — renderInstallerMesh emits pkgs.netbird + the idss-installer-mesh boot oneshot carrying the baked key (TestRenderInstallerMesh_CarriesTheMeshClientAndTheFreshKey), and the kexec phase builds from it and passes --kexec on the kexec phase alone (TestEnroll_TakeoverKexecBundlesTheMeshClient; _WithoutBuilderKeepsTheStockKexecImage; _KexecBuildFailureRedsCleanBeforeErasing). The nix eval-smoke over the BUILT installer config rides #1014 with the production builder (it needs the nixos-images flake input the builder adds)."
  },
  "summary": "Landed the offline spine of the ADR 0209 amendment (#1011 ruled B): mint the fresh MeshMinter key at takeover start, thread clan.InstallerMesh into the kexec phase, renderInstallerMesh carries netbird + the baked key, and installArgs passes --kexec behind the injected InstallerImageBuilder port; the production nix builder + live drive are filed as #1014.",
  "reason": "The production kexec-image builder (a nixos-images flake input + a nix-build of the tarball) and the live wt0-rejoin drive (acceptance #1) are unverifiable offline and spike/lab-shaped, so they are split into #1014; this slice delivers every offline-provable deliverable (mint, thread, render, phase-arg) test-first.",
  "blockers": []
}
**close-report** for #1012 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1012, "status": "success", "commits": [ "21946b2fd17564d52b0bb7c55b684161465d1d06" ], "changed_files": [ "STATUS.md", "control-plane/cmd/control-plane/whole_composition.go", "internal/clan/adapter.go", "internal/clan/clan.go", "internal/clan/enrollment.go", "internal/clan/installer_mesh_test.go", "internal/clan/netbird.go", "internal/provision/provision.go", "internal/provision/takeover.go", "internal/provision/takeover_test.go" ], "tests": [ { "command": "go test ./internal/clan/ -run InstallerMesh|TakeoverKexec|TakeoverWithoutBuilder -count=1", "exit_code": 0 }, { "command": "go test ./internal/provision/ -run Installer|Mint|NonMesh -count=1", "exit_code": 0 }, { "command": "go test ./internal/clan ./internal/provision ./internal/enroll ./control-plane/cmd/control-plane -count=1", "exit_code": 0 }, { "command": "go build ./... && go vet ./internal/clan/ ./internal/provision/ ./control-plane/cmd/control-plane/", "exit_code": 0 } ], "criteria": { "A takeover on a mesh-addressed device completes all four phases over wt0; the device journal shows the installer environment's netbird join": "LIVE HALF — not provable in an offline sandcastle iteration (no droplet). This slice lands the offline spine acceptance #1 depends on: the mint at takeover start, the InstallerMesh thread into the kexec phase, and installArgs passing --kexec. The live wt0 rejoin needs the PRODUCTION kexec-image builder (clan.WithInstallerImageBuilder) which is filed as #1014 (spike/lab-shaped); the paid drive proof rides it. Until then a mesh takeover mints the key but keeps the stock kexec image (unchanged behaviour, no regression).", "The installer's setup key is minted at takeover start via the MeshMinter port — single-use, same node identity, never the device's original join key": "MET — internal/provision/takeover.go runTakeover mints via the new provision.InstallerMeshMinter port (WithInstallerMeshMinter), wired in whole_composition.go over the same enroll.MeshMinter Approve uses, scoped to clan.NodeID(d.ID)=node-<requestID>, and threaded as req.InstallerMesh (a fresh key, never the original join key). Proven by TestDeployTakeover_MintsInstallerMeshKeyForMeshDevice and _RefusesWhenInstallerMintFails.", "No public/NetworkFacts.Address fallback is introduced (option A rejected)": "MET — the mint and the render are gated on d.MeshAddress != \"\" only; no NetworkFacts.Address path is added. Proven by TestDeployTakeover_NonMeshDeviceDoesNotMintInstallerKey (a non-mesh device never mints and carries no installer admission).", "Offline: render/eval-smoke proves the kexec bundle carries the mesh client and the phase runner passes the minted key into the installer environment": "MET (render + phase-runner half) — renderInstallerMesh emits pkgs.netbird + the idss-installer-mesh boot oneshot carrying the baked key (TestRenderInstallerMesh_CarriesTheMeshClientAndTheFreshKey), and the kexec phase builds from it and passes --kexec on the kexec phase alone (TestEnroll_TakeoverKexecBundlesTheMeshClient; _WithoutBuilderKeepsTheStockKexecImage; _KexecBuildFailureRedsCleanBeforeErasing). The nix eval-smoke over the BUILT installer config rides #1014 with the production builder (it needs the nixos-images flake input the builder adds)." }, "summary": "Landed the offline spine of the ADR 0209 amendment (#1011 ruled B): mint the fresh MeshMinter key at takeover start, thread clan.InstallerMesh into the kexec phase, renderInstallerMesh carries netbird + the baked key, and installArgs passes --kexec behind the injected InstallerImageBuilder port; the production nix builder + live drive are filed as #1014.", "reason": "The production kexec-image builder (a nixos-images flake input + a nix-build of the tarball) and the live wt0-rejoin drive (acceptance #1) are unverifiable offline and spike/lab-shaped, so they are split into #1014; this slice delivers every offline-provable deliverable (mint, thread, render, phase-arg) test-first.", "blockers": [] } ``` </details>
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.

Reference
Matou/idss#1012
No description provided.