the member-device takeover blackholes on the device's wt0 door — the gateway is still not a peer on its own mesh, and #996's reachability preflight never runs on the control-plane adapter #1000

Closed
opened 2026-08-29 21:06:28 +00:00 by matou-build-agent · 3 comments

Failure

deploy-takeover red after 21m41s (artifacts/legs.json — "ms": 1301260) with:

deploy failed (resume): the takeover of node-req-0003 stopped: the takeover was cut off mid-run — re-drive it to resume where it stopped, never re-running completed disk work

artifacts/verdict.json → firstRedLeg: deploy-takeover, 26 green / 1 red, commit da29aa9d. Nothing was cut off: no SSH session to node-req-0003 ever existed. Drive 20260829T201942Z, signature 800a2936720b.

Evidence

The takeover never touched the device. logs/device-journal.txt logs every inbound sshd connection — including passing internet scanners (Connection closed by 212.79.122.92 port 39248 at 20:36:38, 77.90.185.16 port 65105 at 20:52:27) — and carries no connection at all between 20:36:38 and 20:59:27 (the forensics harvest). The gateway's control plane logged the failure at 20:58:02 (logs/gateway-journal.txt:1994) with nothing in between but rental-lease heartbeats at 20:39/20:44/20:49/20:54. The device is still stock Ubuntu on /dev/vda1, 2.0 GB used, up 38 min with no reboot (logs/device-stall.txt) — zero disk work was done, so the "never re-running completed disk work" resume promise describes nothing.

The deploy target is the device's wt0 door. internal/provision/takeover.go:158 aims the enroll at root@<d.MeshAddress>. The device's wt0 came up at 20:36:18 on 100.117.157.166 (logs/device-journal.txt: wt0: Link UP, resolved DNS set to 100.117.157.166; logs/device-units.txt ss -tlnp shows netbird's DNS listener bound there).

The gateway is not a peer on its own mesh. logs/gateway-units.txt ss -tlnp shows the server stack only — netbird-mgmt (:8011/:9090), netbird-signal (:8012), coturn (:3478) — and no wt0 anywhere. The client daemon is running but never joined (logs/gateway-stall.txt: netbird-client-0.72.3/bin/netbird service run, pid 2367), because the self-admit oneshot still rests: logs/gateway-journal.txt:1320 — idss-mesh-self-admit: deferred to #973 (live control-plane mint + rehearsal-d wt0 proof); the peer daemon is ready, the mint is not yet wired — resting (the rendered script, internal/clan/netbird.go:482).

So the gateway's SSH to root@100.117.157.166 left on its default route into CGNAT space and blackholed — SYN retries, no refusal.

Why it cost 21 minutes and then lied about it. The machines install phase burned defaultPhaseTimeout (internal/clan/enrollment.go:67 — 20 min), classified FailInterrupted, and took the severedRemedy branch (internal/clan/enrollment.go:750 → internal/clan/enrollment.go:1613), which internal/provision/takeover.go:186-189 renders as the resumable "cut off mid-run" block the journey read off [data-field="deploy-failure"].

Suspected layer — two distinct defects

1. Blocking (why the leg is red): the gateway has no mesh door to the device

ADR 0210 has the member-device takeover reach the device at its wt0 address, but the gateway cannot route there until it admits itself to its own plane. #964 landed the render (the gateway declares services.netbird.clients.mesh and the idss-mesh-self-admit oneshot's structure) with the oneshot's body resting — its live setup-key mint was deferred to #973. #973 has since landed the mint source (the control plane is the plane's own JWT issuer + loopback JWKS), but the oneshot was never un-rested, so it still announces the deferral and exits 0. That is #973's own named residue: "#964's idss-mesh-self-admit oneshot un-rests on the same source (its own ticket)" (STATUS.md:19).

2. Why it cost a full 20-minute ceiling: #996's preflight is wired into the wrong adapter

internal/clan/enrollment.go:719 gates the fast fault on e.a.reachPreflight. The only production wiring that sets it is the app helper's adapter — app/helper/cmd/helper/wiring_prod.go:101. But the member-device takeover runs in the gateway control plane, whose adapter is built with no options at all:

// control-plane/cmd/control-plane/main.go:185
return repo, clan.New(repo, clan.ExecCLI{}, log)

STATUS.md:5 records #996 as making "the member-device takeover ... FAIL FAST when its deploy target is unreachable"; on the code path that actually runs that takeover, the preflight never fires. The gate's other two conditions held here — s.Target was set (the mesh address was reported) and len(s.DonePhases) == 0 on a fresh takeover — so wiring the option is all that stood between this run and a 30-second truthful fault.

What plugging it needs

  • (a) Wire the preflight into the control-plane adapter. Add clan.WithReachabilityPreflight() at control-plane/cmd/control-plane/main.go:185. One line, already-ruled — it completes #996 on the path that faults. Turns 21m41s of silence into a truthful FailUnreachable naming root@100.117.157.166 in ~30 s. It does not make the leg green. Worth a wiring assertion so this cannot regress: the option is unobservable from outside internal/clan today, so it needs either a small exported predicate on *clan.Adapter or a structural test in control-plane/cmd/control-plane.
  • (b) Un-rest idss-mesh-self-admit so the gateway mints its own setup key through the control plane and comes up with a wt0 — #964's named residue, ruled option A, blocker (#973) landed. This is what actually turns the leg green, and it is #854's own AC4 (the live wt0 proof the whole chain deferred here).
  • Do not decide #996 part (3) in-ticket — whether the takeover should fall back to the device's probe-captured public/LAN address while the gateway is not yet a peer. STATUS.md:5 flags it as an un-ruled ADR 0210 amendment needing a human ruling; (b) is the already-ruled path to the same green.

Healer note

Not self-fixed. (b) is render/infra work outside a healer's envelope, and (a) alone leaves the drive red at the same leg for the cost of another paid droplet. Three prior heals on signature 800a2936720b (0915977a, 1554943e, ccee5984) each fixed a real defect and deploy-takeover stayed red — the mesh door is the fault underneath them.

drive 20260829T201942Z red at deploy-takeover: deploy failed (resume): the takeover of node-req-0003 stopped: the takeover was cut off mid-run — re-drive it to resume where it stopped, never re-running completed disk work
evidence: /home/swarm/swarm/Matou/idss/test-results/drive-device/20260829T201942Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## Failure `deploy-takeover` red after **21m41s** (`artifacts/legs.json` — `"ms": 1301260`) with: > deploy failed (resume): the takeover of node-req-0003 stopped: the takeover was cut off mid-run — re-drive it to resume where it stopped, never re-running completed disk work `artifacts/verdict.json` → `firstRedLeg: deploy-takeover`, 26 green / 1 red, commit `da29aa9d`. Nothing was cut off: **no SSH session to node-req-0003 ever existed.** Drive `20260829T201942Z`, signature `800a2936720b`. ## Evidence **The takeover never touched the device.** `logs/device-journal.txt` logs every inbound sshd connection — including passing internet scanners (`Connection closed by 212.79.122.92 port 39248` at 20:36:38, `77.90.185.16 port 65105` at 20:52:27) — and carries **no connection at all** between 20:36:38 and 20:59:27 (the forensics harvest). The gateway's control plane logged the failure at 20:58:02 (`logs/gateway-journal.txt:1994`) with nothing in between but rental-lease heartbeats at 20:39/20:44/20:49/20:54. The device is still stock Ubuntu on `/dev/vda1`, 2.0 GB used, `up 38 min` with no reboot (`logs/device-stall.txt`) — zero disk work was done, so the "never re-running completed disk work" resume promise describes nothing. **The deploy target is the device's wt0 door.** `internal/provision/takeover.go:158` aims the enroll at `root@<d.MeshAddress>`. The device's wt0 came up at 20:36:18 on `100.117.157.166` (`logs/device-journal.txt`: `wt0: Link UP`, resolved DNS set to `100.117.157.166`; `logs/device-units.txt` `ss -tlnp` shows netbird's DNS listener bound there). **The gateway is not a peer on its own mesh.** `logs/gateway-units.txt` `ss -tlnp` shows the *server* stack only — netbird-mgmt (:8011/:9090), netbird-signal (:8012), coturn (:3478) — and **no wt0 anywhere**. The client daemon is running but never joined (`logs/gateway-stall.txt`: `netbird-client-0.72.3/bin/netbird service run`, pid 2367), because the self-admit oneshot still rests: `logs/gateway-journal.txt:1320` — `idss-mesh-self-admit: deferred to #973 (live control-plane mint + rehearsal-d wt0 proof); the peer daemon is ready, the mint is not yet wired — resting` (the rendered script, `internal/clan/netbird.go:482`). So the gateway's SSH to `root@100.117.157.166` left on its default route into CGNAT space and blackholed — SYN retries, no refusal. **Why it cost 21 minutes and then lied about it.** The `machines install` phase burned `defaultPhaseTimeout` (`internal/clan/enrollment.go:67` — 20 min), classified `FailInterrupted`, and took the `severedRemedy` branch (`internal/clan/enrollment.go:750` → `internal/clan/enrollment.go:1613`), which `internal/provision/takeover.go:186-189` renders as the resumable "cut off mid-run" block the journey read off `[data-field="deploy-failure"]`. ## Suspected layer — two distinct defects ### 1. Blocking (why the leg is red): the gateway has no mesh door to the device ADR 0210 has the member-device takeover reach the device at its wt0 address, but the gateway cannot route there until it admits itself to its own plane. #964 landed the *render* (the gateway declares `services.netbird.clients.mesh` and the `idss-mesh-self-admit` oneshot's structure) with the oneshot's **body resting** — its live setup-key mint was deferred to #973. #973 has since landed the mint source (the control plane is the plane's own JWT issuer + loopback JWKS), but the oneshot was never un-rested, so it still announces the deferral and exits 0. That is #973's own named residue: "#964's `idss-mesh-self-admit` oneshot un-rests on the same source (its own ticket)" (`STATUS.md:19`). ### 2. Why it cost a full 20-minute ceiling: #996's preflight is wired into the wrong adapter `internal/clan/enrollment.go:719` gates the fast fault on `e.a.reachPreflight`. The only production wiring that sets it is the **app helper's** adapter — `app/helper/cmd/helper/wiring_prod.go:101`. But the member-device takeover runs in the **gateway control plane**, whose adapter is built with no options at all: ```go // control-plane/cmd/control-plane/main.go:185 return repo, clan.New(repo, clan.ExecCLI{}, log) ``` `STATUS.md:5` records #996 as making "the member-device takeover ... FAIL FAST when its deploy target is unreachable"; on the code path that actually runs that takeover, the preflight never fires. The gate's other two conditions held here — `s.Target` was set (the mesh address was reported) and `len(s.DonePhases) == 0` on a fresh takeover — so wiring the option is all that stood between this run and a 30-second truthful fault. ## What plugging it needs - **(a) Wire the preflight into the control-plane adapter.** Add `clan.WithReachabilityPreflight()` at `control-plane/cmd/control-plane/main.go:185`. One line, already-ruled — it completes #996 on the path that faults. Turns 21m41s of silence into a truthful `FailUnreachable` naming `root@100.117.157.166` in ~30 s. It does **not** make the leg green. Worth a wiring assertion so this cannot regress: the option is unobservable from outside `internal/clan` today, so it needs either a small exported predicate on `*clan.Adapter` or a structural test in `control-plane/cmd/control-plane`. - **(b) Un-rest `idss-mesh-self-admit`** so the gateway mints its own setup key through the control plane and comes up with a `wt0` — #964's named residue, ruled option A, blocker (#973) landed. This is what actually turns the leg green, and it is #854's own AC4 (the live `wt0` proof the whole chain deferred here). - **Do not** decide #996 part (3) in-ticket — whether the takeover should fall back to the device's probe-captured public/LAN address while the gateway is not yet a peer. `STATUS.md:5` flags it as an un-ruled ADR 0210 amendment needing a human ruling; (b) is the already-ruled path to the same green. ## Healer note Not self-fixed. (b) is render/infra work outside a healer's envelope, and (a) alone leaves the drive red at the same leg for the cost of another paid droplet. Three prior heals on signature `800a2936720b` (`0915977a`, `1554943e`, `ccee5984`) each fixed a real defect and `deploy-takeover` stayed red — the mesh door is the fault underneath them. drive `20260829T201942Z` red at `deploy-takeover`: `deploy failed (resume): the takeover of node-req-0003 stopped: the takeover was cut off mid-run — re-drive it to resume where it stopped, never re-running completed disk work` evidence: `/home/swarm/swarm/Matou/idss/test-results/drive-device/20260829T201942Z` 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 -->
Owner

Scope note (ADR 0174, session hands): the first half of this ticket — "the gateway is still not a peer on its own mesh" — is exactly #998's deliverable (un-rest idss-mesh-self-admit via the #973 issuer). Do not re-implement the self-admit here; both tickets block #854 and #998 owns that fix.

This ticket's own scope is the two things #998 does not cover, both proven by this run's forensics:

  1. #996's reachability preflight never runs on the control-plane adapter path — the drive burned 21m41s (ms: 1301260) with zero SSH connections to the device (logs/device-journal.txt shows only internet scanners for the whole window). The fail-fast must cover the adapter path the takeover actually uses.
  2. The failure surface lies — "cut off mid-run — re-drive to resume, never re-running completed disk work" was reported when no connection ever existed and no disk work was done (device still stock Ubuntu, 2.0 GB, no reboot). A never-connected takeover must say so, not promise a resume of nothing.
**Scope note (ADR 0174, session hands):** the first half of this ticket — "the gateway is still not a peer on its own mesh" — is exactly **#998**'s deliverable (un-rest `idss-mesh-self-admit` via the #973 issuer). Do **not** re-implement the self-admit here; both tickets block #854 and #998 owns that fix. This ticket's own scope is the two things #998 does not cover, both proven by this run's forensics: 1. **#996's reachability preflight never runs on the control-plane adapter path** — the drive burned 21m41s (`ms: 1301260`) with zero SSH connections to the device (`logs/device-journal.txt` shows only internet scanners for the whole window). The fail-fast must cover the adapter path the takeover actually uses. 2. **The failure surface lies** — "cut off mid-run — re-drive to resume, never re-running completed disk work" was reported when **no connection ever existed and no disk work was done** (device still stock Ubuntu, 2.0 GB, no reboot). A never-connected takeover must say so, not promise a resume of nothing.
Author
Member

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

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

close-report for #1000 — status success

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

envelope
{
  "issue": 1000,
  "status": "success",
  "commits": [
    "4aec658"
  ],
  "changed_files": [
    "control-plane/cmd/control-plane/main.go",
    "internal/clan/adapter.go",
    "control-plane/cmd/control-plane/preflight_wiring_test.go",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "go test ./control-plane/cmd/control-plane/ -run TestControlPlaneAdapter_CarriesReachabilityPreflight",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/clan/",
      "exit_code": 0
    },
    {
      "command": "go test ./control-plane/cmd/control-plane/",
      "exit_code": 0
    }
  ],
  "criteria": {
    "(a) Wire the preflight into the control-plane adapter": "control-plane/cmd/control-plane/main.go now builds clan.New(repo, clan.ExecCLI{}, log, clan.WithReachabilityPreflight()); a fresh unreachable takeover faults FailUnreachable in ~30s (behaviour proven at internal/clan/enroll_reachability_test.go) instead of the 20-min ceiling + severedRemedy lie",
    "wiring assertion so it cannot regress": "exported predicate (*clan.Adapter).ReachabilityPreflightEnabled() in internal/clan/adapter.go + control-plane/cmd/control-plane/preflight_wiring_test.go (TestControlPlaneAdapter_CarriesReachabilityPreflight) — verified red without the option, green with it",
    "a never-connected takeover must say so, not promise a resume of nothing": "with the preflight wired on the control-plane path, a fresh takeover to an unroutable target classifies FailUnreachable (StatusFailed, no severedRemedy), not FailInterrupted's resume block — the truthful-surface half of Ben's scope note"
  },
  "summary": "Wired #996's reachability preflight onto the control-plane clan adapter (the path the member-device takeover actually runs) and locked it with an exported predicate + wiring test.",
  "blockers": []
}
**close-report** for #1000 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1000, "status": "success", "commits": [ "4aec658" ], "changed_files": [ "control-plane/cmd/control-plane/main.go", "internal/clan/adapter.go", "control-plane/cmd/control-plane/preflight_wiring_test.go", "STATUS.md" ], "tests": [ { "command": "go test ./control-plane/cmd/control-plane/ -run TestControlPlaneAdapter_CarriesReachabilityPreflight", "exit_code": 0 }, { "command": "go test ./internal/clan/", "exit_code": 0 }, { "command": "go test ./control-plane/cmd/control-plane/", "exit_code": 0 } ], "criteria": { "(a) Wire the preflight into the control-plane adapter": "control-plane/cmd/control-plane/main.go now builds clan.New(repo, clan.ExecCLI{}, log, clan.WithReachabilityPreflight()); a fresh unreachable takeover faults FailUnreachable in ~30s (behaviour proven at internal/clan/enroll_reachability_test.go) instead of the 20-min ceiling + severedRemedy lie", "wiring assertion so it cannot regress": "exported predicate (*clan.Adapter).ReachabilityPreflightEnabled() in internal/clan/adapter.go + control-plane/cmd/control-plane/preflight_wiring_test.go (TestControlPlaneAdapter_CarriesReachabilityPreflight) — verified red without the option, green with it", "a never-connected takeover must say so, not promise a resume of nothing": "with the preflight wired on the control-plane path, a fresh takeover to an unroutable target classifies FailUnreachable (StatusFailed, no severedRemedy), not FailInterrupted's resume block — the truthful-surface half of Ben's scope note" }, "summary": "Wired #996's reachability preflight onto the control-plane clan adapter (the path the member-device takeover actually runs) and locked it with an exported predicate + wiring test.", "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#1000
No description provided.