rehearsal-e: the #1214 fixes ride /run drop-ins — a gateway reboot resurrects the MaxMind gate + the :9090 metrics collision until the gateway config is re-rendered #1222

Closed
opened 2026-09-04 20:04:03 +00:00 by ben · 4 comments
Owner

Live-verified 2026-09-04 ~20:00 UTC on the standing rehearsal-e gateway (170.64.139.203, up 9h42 at probe time):

  • /run/systemd/system/netbird-management.service.d/ carries Environment=NB_DISABLE_GEOLOCATION=true and /run/systemd/system/netbird-relay.service.d/ carries Environment=NB_METRICS_PORT=8015 — the #1214 one-shot live repair.
  • The baked units do NOT carry either: systemctl cat netbird-management shows the drop-in as an append, and the baked ExecStart still says --metrics-port 9090.
  • The community config repo on the gateway (/srv/idss/config, top commit 9a5c858) greps clean of NB_DISABLE_GEOLOCATION — the durable fix (internal/clan/netbird.go lines ~334/376, landed e6f8a4e6 + bea4f095) has not been re-rendered into this standing community, because the phase-7 device drives deploy device machines, not the gateway's own closure.

Consequence

/run drop-ins do not survive a reboot. The first reboot of this gateway silently restores the pre-#1214 world: management gates :8011 on the MaxMind mirror and the relay/management :9090 metrics collision kills the plane — the standing community goes dark with no code having changed, which is exactly the "derivable != deployed" class (GOTCHAS #92).

Fix

Re-render + deploy the gateway config for rehearsal-e (any operation that re-runs the netbird module render lands both settings durably — "the next re-found" in the #1214 notes). Whoever does it should verify afterward that systemctl cat netbird-management shows the geolocation env in the unit file (not a /run drop-in) and the relay carries its metrics port natively, then remove the /run drop-ins.

Found as a phase-7 follow-up (#1153 wrap-up); not blocking while the gateway stays up.

<!-- session-host: elitebook-distributed-server-03 --> Live-verified 2026-09-04 ~20:00 UTC on the standing rehearsal-e gateway (170.64.139.203, up 9h42 at probe time): - `/run/systemd/system/netbird-management.service.d/` carries `Environment=NB_DISABLE_GEOLOCATION=true` and `/run/systemd/system/netbird-relay.service.d/` carries `Environment=NB_METRICS_PORT=8015` — the #1214 one-shot live repair. - The **baked** units do NOT carry either: `systemctl cat netbird-management` shows the drop-in as an append, and the baked ExecStart still says `--metrics-port 9090`. - The community config repo on the gateway (`/srv/idss/config`, top commit `9a5c858`) greps clean of `NB_DISABLE_GEOLOCATION` — the durable fix (`internal/clan/netbird.go` lines ~334/376, landed `e6f8a4e6` + `bea4f095`) has not been re-rendered into this standing community, because the phase-7 device drives deploy device machines, not the gateway's own closure. ## Consequence `/run` drop-ins do not survive a reboot. The first reboot of this gateway silently restores the pre-#1214 world: management gates :8011 on the MaxMind mirror and the relay/management :9090 metrics collision kills the plane — the standing community goes dark with no code having changed, which is exactly the "derivable != deployed" class (GOTCHAS #92). ## Fix Re-render + deploy the gateway config for rehearsal-e (any operation that re-runs the netbird module render lands both settings durably — "the next re-found" in the #1214 notes). Whoever does it should verify afterward that `systemctl cat netbird-management` shows the geolocation env in the **unit file** (not a `/run` drop-in) and the relay carries its metrics port natively, then remove the `/run` drop-ins. Found as a phase-7 follow-up (#1153 wrap-up); not blocking while the gateway stays up.

This was generated by AI during triage.

Ruled by agent under ADR 0174 — veto anytime

Ruling: ready-for-session (an interactive agent session with the standing rehearsal-e gateway's droplet standing), not ready-for-human.

Why this is a two-way door. The durable code fix is already on main — verified: internal/clan/netbird.go:334 sets NB_DISABLE_GEOLOCATION = "true" and :376 exports NB_METRICS_PORT (commits e6f8a4e6 + bea4f095, #1214). What remains is purely a live-infra deploy: re-run the netbird module render on the standing gateway so both settings land in the baked units instead of the /run drop-ins. That operation is:

  • Revertible — the re-render is idempotent and the current /run drop-ins already hold the correct values, so the live plane never regresses during the operation; a bad render is undone by re-founding/re-rendering.
  • Provable — systemctl cat netbird-management must show NB_DISABLE_GEOLOCATION in the unit file (not a /run drop-in) and the relay must carry NB_METRICS_PORT=8015 natively; the /run drop-ins are then removed and the plane re-probed.
  • Not on the one-way-door list — no personal credentials, no security-posture widening (this removes an unintended MaxMind gate and a metrics-port collision, restoring intended posture), no data destruction, no non-routine spend.

Why not ready-for-agent: this is a live operation on droplet 170.64.139.203 needing host standing — a swarm worker (which reads only ready-for-agent) cannot reach it and would walk to agent-blocked. Why not snapshot-pending/deploy-pending: those auto-close when a new snapshot/install carries the fix, but nothing re-renders an already-standing community's closure — this specific gateway needs the render run against it (GOTCHAS #92, "derivable != deployed").

Session brief

  • Where: standing rehearsal-e gateway, 170.64.139.203; config repo /srv/idss/config (top commit 9a5c858 greps clean of NB_DISABLE_GEOLOCATION).
  • Do: run any operation that re-runs the netbird module render for rehearsal-e (a re-found / re-render lands both settings durably — "the next re-found" in the #1214 notes).
  • Verify: systemctl cat netbird-management shows NB_DISABLE_GEOLOCATION=true in the unit file (not /run); relay carries NB_METRICS_PORT=8015 natively; then remove the /run drop-ins under /run/systemd/system/netbird-management.service.d/ and /run/systemd/system/netbird-relay.service.d/ and confirm the plane stays up.
  • Not blocking while the gateway stays up; the risk is the first reboot silently restoring the pre-#1214 world.
> *This was generated by AI during triage.* ## Ruled by agent under ADR 0174 — veto anytime **Ruling: `ready-for-session`** (an interactive agent session with the standing rehearsal-e gateway's droplet standing), not `ready-for-human`. **Why this is a two-way door.** The durable code fix is already on main — verified: `internal/clan/netbird.go:334` sets `NB_DISABLE_GEOLOCATION = "true"` and `:376` exports `NB_METRICS_PORT` (commits `e6f8a4e6` + `bea4f095`, #1214). What remains is purely a **live-infra deploy**: re-run the netbird module render on the standing gateway so both settings land in the baked units instead of the `/run` drop-ins. That operation is: - **Revertible** — the re-render is idempotent and the current `/run` drop-ins already hold the correct values, so the live plane never regresses during the operation; a bad render is undone by re-founding/re-rendering. - **Provable** — `systemctl cat netbird-management` must show `NB_DISABLE_GEOLOCATION` in the **unit file** (not a `/run` drop-in) and the relay must carry `NB_METRICS_PORT=8015` natively; the `/run` drop-ins are then removed and the plane re-probed. - **Not on the one-way-door list** — no personal credentials, no security-posture *widening* (this removes an unintended MaxMind gate and a metrics-port collision, restoring intended posture), no data destruction, no non-routine spend. **Why not `ready-for-agent`:** this is a live operation on droplet `170.64.139.203` needing host standing — a swarm worker (which reads only `ready-for-agent`) cannot reach it and would walk to `agent-blocked`. **Why not `snapshot-pending`/`deploy-pending`:** those auto-close when a *new* snapshot/install carries the fix, but nothing re-renders an **already-standing** community's closure — this specific gateway needs the render run against it (GOTCHAS #92, "derivable != deployed"). ## Session brief - **Where:** standing rehearsal-e gateway, `170.64.139.203`; config repo `/srv/idss/config` (top commit `9a5c858` greps clean of `NB_DISABLE_GEOLOCATION`). - **Do:** run any operation that re-runs the netbird module render for rehearsal-e (a re-found / re-render lands both settings durably — "the next re-found" in the #1214 notes). - **Verify:** `systemctl cat netbird-management` shows `NB_DISABLE_GEOLOCATION=true` in the unit file (not `/run`); relay carries `NB_METRICS_PORT=8015` natively; then remove the `/run` drop-ins under `/run/systemd/system/netbird-management.service.d/` and `/run/systemd/system/netbird-relay.service.d/` and confirm the plane stays up. - **Not blocking** while the gateway stays up; the risk is the first reboot silently restoring the pre-#1214 world.

Routed to elitebook-distributed-server-03 (host affinity, #89) — Ruled by agent under ADR 0174, veto anytime

A matou-workstation (matou-dev-server-01) session-runner claimed and worked this ticket, but this host does not hold the door to the standing rehearsal-e gateway, so the live re-render+deploy cannot run here. Adding <!-- session-host: elitebook-distributed-server-03 --> to the body so the host that does hold the door picks it up next. Kept ready-for-session — the triage ruling stands (this is a two-way live-infra op, not ready-for-human); it just needs a different session's standing.

Why this host can't do it (proof)

  • The gateway is up and reachable on :22 (170.64.139.203), but it trusts only the per-founding rent-operator key (ADR 0191) held in the founding host's standing home. Both keys available here are refused:
    • ambient ~/.ssh/id_ed25519 → Permission denied (publickey)
    • ~/.ssh/idss_broker_deploy → Permission denied (publickey)
  • No rehearsal-e standing home on this host: find /home/dev /srv /var/lib -name facts.json -path '*standing*' and -path '*rent-operator*' return nothing; no test-results/standing-rented/ anywhere on the box.
  • The rent-operator key + facts.json for rehearsal-e live on the host that founded and drives its standing community — elitebook-distributed-server-03, which ran the phase-5 device regression #1228 against rehearsal-e GREEN on 2026-09-04 (run 20260904T212812Z) and holds the working gateway door. Claim history confirms that host works the rehearsal-e standing lane (#1183/#1201/#1205/#1218).

Why affinity, not ready-for-human

This is the exact case #89 exists for (the #743/#746 failure mode): a ticket whose door lives on a host that isn't the one that ticked first. The marker makes future matou-workstation ticks skip at pick time (never a counted attempt) while elitebook-distributed-server-03 takes it with the standing it needs. No one-way door is involved — no personal credentials, no security-posture widening, no data destruction, no spend.

What the taking session must do (unchanged from the ticket + triage brief)

  1. Re-render + deploy the rehearsal-e gateway config so the netbird module render (durable fix e6f8a4e6 + bea4f095, internal/clan/netbird.go:334/:376, already on main) lands NB_DISABLE_GEOLOCATION=true and NB_METRICS_PORT=8015 into the baked units.
  2. Verify: systemctl cat netbird-management shows the geolocation env in the unit file (not a /run drop-in), and netbird-relay carries its metrics port natively.
  3. Remove the /run drop-ins and re-probe the plane (:8011 → 401, relay/management metrics no longer colliding on :9090).

Note for the taking session: confirm the gateway hasn't already rebooted since 2026-09-04 ~20:00 UTC — if it has, the plane is already dark and this becomes a live-repair-first, then durable-render.

Ruled by agent under ADR 0174 — veto anytime.

## Routed to `elitebook-distributed-server-03` (host affinity, #89) — Ruled by agent under ADR 0174, veto anytime A `matou-workstation` (`matou-dev-server-01`) session-runner claimed and worked this ticket, but **this host does not hold the door** to the standing rehearsal-e gateway, so the live re-render+deploy cannot run here. Adding `<!-- session-host: elitebook-distributed-server-03 -->` to the body so the host that *does* hold the door picks it up next. **Kept `ready-for-session`** — the triage ruling stands (this is a two-way live-infra op, not `ready-for-human`); it just needs a *different* session's standing. ### Why this host can't do it (proof) - The gateway is up and reachable on `:22` (170.64.139.203), but it trusts only the per-founding **rent-operator key** (ADR 0191) held in the founding host's standing home. Both keys available here are refused: - ambient `~/.ssh/id_ed25519` → `Permission denied (publickey)` - `~/.ssh/idss_broker_deploy` → `Permission denied (publickey)` - No rehearsal-e standing home on this host: `find /home/dev /srv /var/lib -name facts.json -path '*standing*'` and `-path '*rent-operator*'` return nothing; no `test-results/standing-rented/` anywhere on the box. - The rent-operator key + `facts.json` for rehearsal-e live on the host that founded and drives its standing community — `elitebook-distributed-server-03`, which ran the phase-5 device regression **#1228** against rehearsal-e GREEN on 2026-09-04 (run `20260904T212812Z`) and holds the working gateway door. Claim history confirms that host works the rehearsal-e standing lane (#1183/#1201/#1205/#1218). ### Why affinity, not `ready-for-human` This is the exact case #89 exists for (the #743/#746 failure mode): a ticket whose door lives on a host that isn't the one that ticked first. The marker makes future `matou-workstation` ticks **skip at pick time** (never a counted attempt) while `elitebook-distributed-server-03` takes it with the standing it needs. No one-way door is involved — no personal credentials, no security-posture widening, no data destruction, no spend. ### What the taking session must do (unchanged from the ticket + triage brief) 1. Re-render + deploy the rehearsal-e gateway config so the netbird module render (durable fix `e6f8a4e6` + `bea4f095`, `internal/clan/netbird.go:334`/`:376`, already on main) lands `NB_DISABLE_GEOLOCATION=true` and `NB_METRICS_PORT=8015` into the **baked** units. 2. Verify: `systemctl cat netbird-management` shows the geolocation env in the **unit file** (not a `/run` drop-in), and `netbird-relay` carries its metrics port natively. 3. Remove the `/run` drop-ins and re-probe the plane (:8011 → 401, relay/management metrics no longer colliding on :9090). *Note for the taking session:* confirm the gateway hasn't already rebooted since 2026-09-04 ~20:00 UTC — if it has, the plane is already dark and this becomes a live-repair-first, then durable-render. Ruled by agent under ADR 0174 — veto anytime.

Close-report — the #1214 fixes are now baked into rehearsal-e's gateway unit files; the /run drop-ins are gone.

Ruled by agent under ADR 0174 — veto anytime. Two-way door: a live NixOS switch on a rented droplet gateway is exactly the "droplet units, established rollback pattern" case ADR 0174 rule 1 blesses; it is revertible (git revert the config commit + nixos-rebuild switch --rollback, and the prior generation system-9 stays in GRUB) and provable (systemctl cat + ss + the management log). No data destroyed (config-only, community data untouched), no spend (in-place, no new rental), no personal credential (the harness-held rent-operator key), no security-posture widening (this bakes the already-landed #1214 decision — disabling geolocation gating + moving the relay's metrics port off :9090; no new public surface).

Root of the residue (confirmed live). The gateway was re-founded at f54163dc (which does carry the #1214 render), yet its /srv/idss/config/machines/gateway/gateway-guest.nix netbird module was the pre-#1214 bake (6df9432 "bake takeover-ready config", from the 2026-08-31 gateway image) — because nothing re-renders the gateway's own closure after founding: the standing-staleness gate classified this community as binary-only re-supply (netbird.go is an agent-path, not one of OC_STANDING_CONFIG_PATHS, and the rented scope isn't drvpath-baselined), and re-supply lands binaries, never a closure re-render. GOTCHAS #92 (derivable != deployed) to the letter.

What landed (on the gateway, not the main repo — no code changed here):

  • Re-rendered the netbird module into gateway-guest.nix faithfully to what internal/clan/netbird.go now emits — systemd.services.netbird-management.environment.NB_DISABLE_GEOLOCATION = "true"; (line 334) and export NB_METRICS_PORT="8015" in the relay script (line 376). Committed in the gateway's config repo as 5eae1b3 (no close keyword; revertible).
  • nixos-rebuild dry-build first: RC=0, delta was exactly the 7 expected derivations (the two netbird units + their toplevel wrappers) — no package rebuilds, no nixpkgs churn.
  • nixos-rebuild switch --flake .#gateway: RC=0. Generation system-9 → system-10 (542045xym2j3pc8d4idmzxc102aakfnx), GRUB updated, netbird-management restarted + netbird-relay restarted.
  • Removed both /run drop-ins (netbird-management.service.d/geolocation.conf, netbird-relay.service.d/metrics-port.conf) + systemctl daemon-reload.

Proof (post-switch, drop-ins removed):

  • systemctl cat netbird-management → the unit file (/etc/systemd/system/…-> /nix/store/…) carries Environment="NB_DISABLE_GEOLOCATION=true"; no /run drop-in remains.
  • netbird-relay native ExecStart script (/nix/store/…-unit-script-netbird-relay-start) carries export NB_METRICS_PORT="8015"; no /run drop-in remains.
  • ls /run/systemd/system | grep netbird → NONE.
  • netbird-management, netbird-relay, idss-control-plane all active; ss -ltnp shows :8011 (mgmt), :9090 (mgmt metrics), :8015 (relay metrics) — the collision is gone.
  • Management log: geolocation service is disabled, skipping initialization — no MaxMind fetch, binds immediately.

Reboot-durable by construction: the two settings now live in the persistent system generation (/etc/systemd/system → /nix/store, the GRUB boot default), not tmpfs /run. A reboot loads the baked units; the drop-ins that would have vanished are already gone. (No live reboot performed — an unattended reboot of a standing gateway is needless risk when the durability is definitional; the plane's active/listening state above is the health proof.)

Follow-up (not this ticket): the systemic gap — a render-affecting internal/clan change that doesn't move drvpath-baseline.txt never lands durably on a standing community (re-supply won't re-render; the rented scope can't be baselined), and the gateway image still bakes a pre-#1214 netbird render for fresh foundings — is filed separately so the next such change doesn't repeat this. This ticket's specific residue (rehearsal-e) is now closed.

**Close-report — the #1214 fixes are now baked into rehearsal-e's gateway unit files; the /run drop-ins are gone.** Ruled by agent under ADR 0174 — veto anytime. **Two-way door:** a live NixOS switch on a rented droplet gateway is exactly the "droplet units, established rollback pattern" case ADR 0174 rule 1 blesses; it is revertible (`git revert` the config commit + `nixos-rebuild switch --rollback`, and the prior generation `system-9` stays in GRUB) and provable (`systemctl cat` + `ss` + the management log). No data destroyed (config-only, community data untouched), no spend (in-place, no new rental), no personal credential (the harness-held rent-operator key), no security-posture widening (this bakes the already-landed #1214 decision — disabling geolocation gating + moving the relay's metrics port off :9090; no new public surface). **Root of the residue (confirmed live).** The gateway was re-founded at `f54163dc` (which *does* carry the #1214 render), yet its `/srv/idss/config/machines/gateway/gateway-guest.nix` netbird module was the pre-#1214 bake (`6df9432 "bake takeover-ready config"`, from the 2026-08-31 gateway image) — because nothing re-renders the gateway's *own* closure after founding: the standing-staleness gate classified this community as binary-only **re-supply** (netbird.go is an agent-path, not one of `OC_STANDING_CONFIG_PATHS`, and the rented scope isn't drvpath-baselined), and re-supply lands binaries, never a closure re-render. GOTCHAS #92 (derivable != deployed) to the letter. **What landed (on the gateway, not the main repo — no code changed here):** - Re-rendered the netbird module into `gateway-guest.nix` faithfully to what `internal/clan/netbird.go` now emits — `systemd.services.netbird-management.environment.NB_DISABLE_GEOLOCATION = "true";` (line 334) and `export NB_METRICS_PORT="8015"` in the relay script (line 376). Committed in the gateway's config repo as `5eae1b3` (no close keyword; revertible). - `nixos-rebuild dry-build` first: RC=0, delta was exactly the 7 expected derivations (the two netbird units + their toplevel wrappers) — no package rebuilds, no nixpkgs churn. - `nixos-rebuild switch --flake .#gateway`: RC=0. Generation `system-9` → `system-10` (`542045xym2j3pc8d4idmzxc102aakfnx`), GRUB updated, netbird-management restarted + netbird-relay restarted. - Removed both `/run` drop-ins (`netbird-management.service.d/geolocation.conf`, `netbird-relay.service.d/metrics-port.conf`) + `systemctl daemon-reload`. **Proof (post-switch, drop-ins removed):** - `systemctl cat netbird-management` → the **unit file** (`/etc/systemd/system/…-> /nix/store/…`) carries `Environment="NB_DISABLE_GEOLOCATION=true"`; no `/run` drop-in remains. - `netbird-relay` native `ExecStart` script (`/nix/store/…-unit-script-netbird-relay-start`) carries `export NB_METRICS_PORT="8015"`; no `/run` drop-in remains. - `ls /run/systemd/system | grep netbird` → NONE. - `netbird-management`, `netbird-relay`, `idss-control-plane` all **active**; `ss -ltnp` shows `:8011` (mgmt), `:9090` (mgmt metrics), `:8015` (relay metrics) — the collision is gone. - Management log: `geolocation service is disabled, skipping initialization` — no MaxMind fetch, binds immediately. **Reboot-durable by construction:** the two settings now live in the persistent system generation (`/etc/systemd/system` → `/nix/store`, the GRUB boot default), not tmpfs `/run`. A reboot loads the baked units; the drop-ins that would have vanished are already gone. (No live reboot performed — an unattended reboot of a standing gateway is needless risk when the durability is definitional; the plane's active/listening state above is the health proof.) **Follow-up (not this ticket):** the systemic gap — a render-affecting `internal/clan` change that doesn't move `drvpath-baseline.txt` never lands durably on a *standing* community (re-supply won't re-render; the rented scope can't be baselined), and the gateway image still bakes a pre-#1214 netbird render for fresh foundings — is filed separately so the next such change doesn't repeat this. This ticket's specific residue (rehearsal-e) is now closed.

Systemic follow-up filed as #1275 (needs-triage): the standing-staleness gate + re-supply path + gateway-image bake gap that let this residue exist. This ticket (rehearsal-e specifically) is done and closing.

Systemic follow-up filed as #1275 (needs-triage): the standing-staleness gate + re-supply path + gateway-image bake gap that let this residue exist. This ticket (rehearsal-e specifically) is done and closing.
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#1222
No description provided.