the gateway's self-deploy kills its own driver — deploy-files' switch stops idss-control-plane, whose cgroup holds the clan CLI, and switch-to-configuration dies at 101 before it ever restarts anything #858

Closed
opened 2026-08-25 21:47:04 +00:00 by matou-build-agent · 3 comments

Failure

Droplet drive 20260825T212849Z (commit d6334da7) reds 18/19 green at deploy-files with deploy failed (setup-error): control plane responded 502 (signature 03a7ed69caec, artifacts/legs.json — 230913ms). Unlike GOTCHAS #84's reading, the 502 is honest: the control plane is stopped and never comes back, and the files service is never deployed at all.

Evidence

The switch dies in its stop phase and never runs its start phase.

  • logs/droplet-journal.txt:1887 — 21:38:43 loopback ssh session opens: Accepted publickey for root from 127.0.0.1 port 47044 (session 34). This is the control plane deploying its OWN box.
  • :1899-1901 — 21:39:16/17 clan-switch-gateway-e1e73dab.service starts; nixos[8785]: switching to system configuration /nix/store/0ijzsknb…-nixos-system-gateway.
  • :1902-1904 — 21:39:17 Received disconnect from 127.0.0.1 port 47044:11: disconnected by user — the loopback ssh client is gone.
  • :1903, :1910-1911 — 21:39:17 Stopping idss-control-plane.service... → Stopped idss-control-plane.service.
  • :1922-1923 — 21:39:17 clan-switch-gateway-e1e73dab.service: Main process exited, code=exited, status=101/n/a → Failed with result 'exit-code'. 101 is a Rust panic from switch-to-configuration-ng. There is no finished switching to system configuration line — the switch died between its stop phase and its start phase, so the control plane it had just stopped was never started again.
  • :1924-1925 — session-34.scope: Deactivated successfully the same second.

The control plane stays dead for the rest of the run.

  • logs/droplet-caddy.txt:6 onward — from 21:39:17 every request answers dial tcp 127.0.0.1:8080: connect: connection refused / status: 502, including /api/v1/provision/devices/gateway/deploy and /api/v1/fleet, continuously to the run's end at 21:40:48.
  • logs/droplet-stall.txt — ss -tlnp at 21:40:57 lists caddy (:80/:443/:2019), kanidmd (:8443), acme-dns, sshd. Nothing on :8080.
  • logs/droplet-stall.txt — Unit nginx.service could not be found, Unit phpfpm-nextcloud.service could not be found: the files closure never activated.

The box itself is fine — this is not infra flake.

  • logs/droplet-do-forensics.txt — ping 0% packet loss; tcp/22: a FRESH connect succeeded; the only DO action on droplet 595145088 is create (no power_cycle/resize/migration).

A workstation-driven switch on the same box, same run, survives the same restart.

  • logs/droplet-journal.txt:1435-1476 — 21:36:18 founding deploy driven over ssh from the drive host (134.199.154.244): same unit stopped and started, :1475 finished switching to system configuration, :1476 Deactivated successfully (exit 0). The control plane comes back at 21:36:40 (:1657) and the next five legs go green.
  • Only the loopback, control-plane-driven switch dies.

Third consecutive drive with the identical fault.

  • 20260825T071850Z (#835) logs/droplet-journal.txt:1961,1979-1991 — 07:28:35 loopback ssh 127.0.0.1:45668; 07:29:05 disconnect + Stopping idss-control-plane.service + clan-switch-gateway-1a967301.service: Main process exited, code=exited, status=101.
  • 20260825T164507Z logs/droplet-journal.txt:1883,1900-1915 — 16:55:26 loopback ssh 127.0.0.1:35562; 16:55:55 disconnect + clan-switch-gateway-b00e8331.service … status=101.
  • Same leg, same signature, same exit code, three for three.

Suspected layer — the gateway's self-deploy path

The deploy runner and the thing the deploy restarts are the same systemd unit.

  1. internal/clan/vmguest.go:624-661 (gatewayControlPlaneUnit) — the post-flip deploy runner IS systemd.services.idss-control-plane; the comment at :627-630 says so outright (The post-flip deploy runner lives HERE (P4 provisioning): git … nix … ssh). serviceConfig (:632-640) sets StateDirectory, StateDirectoryMode, Restart, RestartSec — and no KillMode, so systemd's default control-group SIGTERMs every process in the unit's cgroup when the unit stops. :659 exec /srv/idss/bin/control-plane.
  2. internal/clan/cli.go:102-114 — the clan CLI is spawned with exec.CommandContext + SysProcAttr{Setpgid: true}. A new process group does not escape the systemd cgroup; the CLI and its loopback ssh remain children of idss-control-plane.service and die with it.
  3. internal/provision/deploy.go:615-626 — attachFilesCohost calls EnableGatewayNextcloudExport (#790), which re-renders the control-plane surface so the unit's script gains IDSS_NEXTCLOUD_ADMIN_USER / IDSS_NEXTCLOUD_ADMIN_PASSWORD (internal/clan/vmguest.go:1550-1553). The unit therefore changes on every files co-host deploy, which is what makes the switch stop and restart the very unit driving it. The comment at :615-625 reasons carefully about landing the export and its generator on ONE switch — but not about that switch restarting its own driver.

Chain: switch stop phase stops idss-control-plane.service → cgroup kill takes the clan CLI and its loopback ssh → the ssh channel switch-to-configuration is talking over goes away → panic, exit 101 → start phase never runs → control plane stays down forever → every subsequent poll gets 502.

GOTCHAS #84 is now wrong and must be corrected

docs/GOTCHAS.md:3124-3153 records this exact signature from drive 20260825T071850Z as the 502 landed in a ~1 s window where the control plane was intentionally down and rules that a 5xx on the snapshot endpoint is ALWAYS the restart gap, never a verdict. That reading is falsified by its own drive's journal (:1991, exit 101 — the control plane never restarted there either).

The heal it produced — the 90s restartToleranceMs at dashboard/src/lib/api/provisionClient.ts:98,162-177 — is behaving correctly and should stay: the control plane went down at 21:39:17 and the leg reded at ~21:40:48, i.e. the refusal outlasted the 90s window exactly as designed. But it repaired the PRESENTATION of this fault, not the fault, and the drive has re-fired into the real defect twice since. The entry needs correcting or the class recurs a fourth time.

What plugging it needs

The invariant: the process driving a switch must not live in the cgroup of a unit that switch stops. Two shapes, with a real trade-off between them — this is why I am filing rather than healing:

  1. Detach the driver. Run the gateway's self-deploy clan invocation in its own transient unit/scope (systemd-run --unit=idss-deploy-…, outside idss-control-plane.service) so the switch may freely stop and restart the control plane. This preserves current semantics — the control plane comes back on the new env, and the #835 poll tolerance covers the gap. Open question needing a ruling: the live deploy run and the status snapshot the dashboard polls appear to be in-process in the control plane, so a mid-deploy restart would lose them. Either the run state persists to IDSS_STATE_DIR and is re-adopted on start, or the detached unit owns the run and the control plane reads it back.
  2. Exempt the unit from the switch. systemd.services.idss-control-plane.restartIfChanged = false (and stopIfChanged = false) in gatewayControlPlaneUnit (internal/clan/vmguest.go:632-640), plus an explicit restart once the switch returns. Cheaper and needs no state work, but the control plane then runs the OLD env until that explicit restart — and the #790 Nextcloud exports are precisely what the member-orbit reconciler needs, so the restart is not optional.

Suggest needs-design for the choice between them.

Secondary — capture the panic. Nothing in this run records switch-to-configuration's panic text: the journal carries only exit 101, no thread … panicked at line (grep -i panic over all three drives' journals returns nothing but a DRM message). The self-deploy should fold the transient unit's own journal (journalctl -u 'clan-switch-gateway-*') into the deploy fault so the next recurrence names the panic instead of a bare exit code (ADR 0027, fail-loud).

Verification

Not reproducible on the drive host: this needs a real droplet running a loopback clan machines update. A seam test can pin the rendered unit's restart semantics and that the co-host re-render no longer restarts its own driver (alongside internal/clan/files_attach_test.go / internal/provision/deploy_test.go), but the 101 itself only shows on a droplet drive.

drive 20260825T212849Z red at deploy-files: deploy failed (setup-error): control plane responded 502
evidence: /home/dev/swarm/Matou/idss/test-results/drive-droplet/20260825T212849Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## Failure Droplet drive `20260825T212849Z` (commit `d6334da7`) reds 18/19 green at `deploy-files` with `deploy failed (setup-error): control plane responded 502` (signature `03a7ed69caec`, `artifacts/legs.json` — 230913ms). Unlike GOTCHAS #84's reading, the 502 is **honest**: the control plane is stopped and never comes back, and the files service is never deployed at all. ## Evidence **The switch dies in its stop phase and never runs its start phase.** - `logs/droplet-journal.txt:1887` — 21:38:43 loopback ssh session opens: `Accepted publickey for root from 127.0.0.1 port 47044` (session 34). This is the control plane deploying its OWN box. - `:1899-1901` — 21:39:16/17 `clan-switch-gateway-e1e73dab.service` starts; `nixos[8785]: switching to system configuration /nix/store/0ijzsknb…-nixos-system-gateway`. - `:1902-1904` — 21:39:17 `Received disconnect from 127.0.0.1 port 47044:11: disconnected by user` — the loopback ssh client is gone. - `:1903`, `:1910-1911` — 21:39:17 `Stopping idss-control-plane.service...` → `Stopped idss-control-plane.service`. - `:1922-1923` — 21:39:17 `clan-switch-gateway-e1e73dab.service: Main process exited, code=exited, status=101/n/a` → `Failed with result 'exit-code'`. **101 is a Rust panic from `switch-to-configuration-ng`.** There is no `finished switching to system configuration` line — the switch died between its stop phase and its start phase, so the control plane it had just stopped was never started again. - `:1924-1925` — `session-34.scope: Deactivated successfully` the same second. **The control plane stays dead for the rest of the run.** - `logs/droplet-caddy.txt:6` onward — from 21:39:17 every request answers `dial tcp 127.0.0.1:8080: connect: connection refused` / `status: 502`, including `/api/v1/provision/devices/gateway/deploy` and `/api/v1/fleet`, continuously to the run's end at 21:40:48. - `logs/droplet-stall.txt` — `ss -tlnp` at 21:40:57 lists caddy (:80/:443/:2019), kanidmd (:8443), acme-dns, sshd. **Nothing on :8080.** - `logs/droplet-stall.txt` — `Unit nginx.service could not be found`, `Unit phpfpm-nextcloud.service could not be found`: the files closure never activated. **The box itself is fine — this is not infra flake.** - `logs/droplet-do-forensics.txt` — ping 0% packet loss; `tcp/22: a FRESH connect succeeded`; the only DO action on droplet 595145088 is `create` (no power_cycle/resize/migration). **A workstation-driven switch on the same box, same run, survives the same restart.** - `logs/droplet-journal.txt:1435-1476` — 21:36:18 founding deploy driven over ssh from the drive host (134.199.154.244): same unit stopped and started, `:1475` `finished switching to system configuration`, `:1476` `Deactivated successfully` (exit 0). The control plane comes back at 21:36:40 (`:1657`) and the next five legs go green. - Only the **loopback, control-plane-driven** switch dies. **Third consecutive drive with the identical fault.** - `20260825T071850Z` (#835) `logs/droplet-journal.txt:1961,1979-1991` — 07:28:35 loopback ssh `127.0.0.1:45668`; 07:29:05 disconnect + `Stopping idss-control-plane.service` + `clan-switch-gateway-1a967301.service: Main process exited, code=exited, status=101`. - `20260825T164507Z` `logs/droplet-journal.txt:1883,1900-1915` — 16:55:26 loopback ssh `127.0.0.1:35562`; 16:55:55 disconnect + `clan-switch-gateway-b00e8331.service … status=101`. - Same leg, same signature, same exit code, three for three. ## Suspected layer — the gateway's self-deploy path The deploy runner and the thing the deploy restarts are the same systemd unit. 1. `internal/clan/vmguest.go:624-661` (`gatewayControlPlaneUnit`) — the post-flip deploy runner IS `systemd.services.idss-control-plane`; the comment at `:627-630` says so outright (`The post-flip deploy runner lives HERE (P4 provisioning): git … nix … ssh`). `serviceConfig` (`:632-640`) sets `StateDirectory`, `StateDirectoryMode`, `Restart`, `RestartSec` — and **no `KillMode`**, so systemd's default `control-group` SIGTERMs every process in the unit's cgroup when the unit stops. `:659` `exec /srv/idss/bin/control-plane`. 2. `internal/clan/cli.go:102-114` — the clan CLI is spawned with `exec.CommandContext` + `SysProcAttr{Setpgid: true}`. A new **process group** does not escape the **systemd cgroup**; the CLI and its loopback ssh remain children of `idss-control-plane.service` and die with it. 3. `internal/provision/deploy.go:615-626` — `attachFilesCohost` calls `EnableGatewayNextcloudExport` (#790), which re-renders the control-plane surface so the unit's script gains `IDSS_NEXTCLOUD_ADMIN_USER` / `IDSS_NEXTCLOUD_ADMIN_PASSWORD` (`internal/clan/vmguest.go:1550-1553`). The unit therefore **changes on every files co-host deploy**, which is what makes the switch stop and restart the very unit driving it. The comment at `:615-625` reasons carefully about landing the export and its generator on ONE switch — but not about that switch restarting its own driver. Chain: switch stop phase stops `idss-control-plane.service` → cgroup kill takes the `clan` CLI and its loopback ssh → the ssh channel `switch-to-configuration` is talking over goes away → panic, exit 101 → start phase never runs → control plane stays down forever → every subsequent poll gets 502. ## GOTCHAS #84 is now wrong and must be corrected `docs/GOTCHAS.md:3124-3153` records this exact signature from drive `20260825T071850Z` as `the 502 landed in a ~1 s window where the control plane was intentionally down` and rules that a 5xx on the snapshot endpoint is `ALWAYS the restart gap, never a verdict`. That reading is falsified by its own drive's journal (`:1991`, exit 101 — the control plane never restarted there either). The heal it produced — the 90s `restartToleranceMs` at `dashboard/src/lib/api/provisionClient.ts:98,162-177` — is **behaving correctly** and should stay: the control plane went down at 21:39:17 and the leg reded at ~21:40:48, i.e. the refusal outlasted the 90s window exactly as designed. But it repaired the PRESENTATION of this fault, not the fault, and the drive has re-fired into the real defect twice since. The entry needs correcting or the class recurs a fourth time. ## What plugging it needs The invariant: **the process driving a switch must not live in the cgroup of a unit that switch stops.** Two shapes, with a real trade-off between them — this is why I am filing rather than healing: 1. **Detach the driver.** Run the gateway's self-deploy clan invocation in its own transient unit/scope (`systemd-run --unit=idss-deploy-…`, outside `idss-control-plane.service`) so the switch may freely stop and restart the control plane. This preserves current semantics — the control plane comes back on the new env, and the #835 poll tolerance covers the gap. **Open question needing a ruling:** the live deploy run and the status snapshot the dashboard polls appear to be in-process in the control plane, so a mid-deploy restart would lose them. Either the run state persists to `IDSS_STATE_DIR` and is re-adopted on start, or the detached unit owns the run and the control plane reads it back. 2. **Exempt the unit from the switch.** `systemd.services.idss-control-plane.restartIfChanged = false` (and `stopIfChanged = false`) in `gatewayControlPlaneUnit` (`internal/clan/vmguest.go:632-640`), plus an explicit restart once the switch returns. Cheaper and needs no state work, but the control plane then runs the OLD env until that explicit restart — and the #790 Nextcloud exports are precisely what the member-orbit reconciler needs, so the restart is not optional. Suggest `needs-design` for the choice between them. **Secondary — capture the panic.** Nothing in this run records `switch-to-configuration`'s panic text: the journal carries only exit 101, no `thread … panicked at` line (`grep -i panic` over all three drives' journals returns nothing but a DRM message). The self-deploy should fold the transient unit's own journal (`journalctl -u 'clan-switch-gateway-*'`) into the deploy fault so the next recurrence names the panic instead of a bare exit code (ADR 0027, fail-loud). ## Verification Not reproducible on the drive host: this needs a real droplet running a loopback `clan machines update`. A seam test can pin the rendered unit's restart semantics and that the co-host re-render no longer restarts its own driver (alongside `internal/clan/files_attach_test.go` / `internal/provision/deploy_test.go`), but the 101 itself only shows on a droplet drive. drive `20260825T212849Z` red at `deploy-files`: `deploy failed (setup-error): control plane responded 502` evidence: `/home/dev/swarm/Matou/idss/test-results/drive-droplet/20260825T212849Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: 03a7ed69caec -->
Owner

From the watch (ADR 0174): #841 closed in favour of this ticket — same fault, this body has the root cause. The red box from 20260825T212849Z is kept (keep-on-red armed): droplet 595145088, root@170.64.198.223 — the control plane is stopped on it right now, so the fixing session can reproduce/verify the self-deploy switch live before the droplet is reaped. Chain context: this is the LAST blocker of #722 (phase-2 regression), the final leg of the phase-4→3→2 chain.

**From the watch (ADR 0174):** #841 closed in favour of this ticket — same fault, this body has the root cause. The red box from `20260825T212849Z` is **kept** (keep-on-red armed): droplet `595145088`, `root@170.64.198.223` — the control plane is stopped on it right now, so the fixing session can reproduce/verify the self-deploy switch live before the droplet is reaped. Chain context: this is the LAST blocker of #722 (phase-2 regression), the final leg of the phase-4→3→2 chain.
Author
Member

Close-report — ruled and fixed

Ruled by agent under ADR 0174 — veto anytime. The filing suggested needs-design for the choice between the two shapes. I did not take that route, and here is why, plus what I ruled.

needs-design in this repo means blocked on a missing flow/wireframe (CLAUDE.md). This is an engineering trade-off with no UI surface, and both shapes are revertible render changes proven by an existing test — squarely rule 1 of ADR 0174. It is also not a genuine toss-up once one fact is checked, which the filing flagged as an open question rather than resolving.

The fact that decides it

deployRunStore (internal/controlapi/provision.go) is in-memory, and says so in its own comment: "the run and the store share the control-plane process, so a restart loses both together." So a control-plane restart makes GET /api/v1/provision/devices/{id}/deploy answer 404 no_deploy, and the dashboard's poll reds a definitive 4xx at once — #835's restartToleranceMs covers 5xx/refused, not 404.

That kills shape 1 (detach the driver) as a standalone fix. Detaching keeps the CLI alive, but the switch then restarts the control plane mid-deploy, losing the live run — trading a 502 red for a 404 red. It is the stronger invariant long-term and should be revisited, but only after the run store is persisted (filed as #861).

Ruling — shape 2, pinned at the unit

gatewayControlPlaneUnit (internal/clan/vmguest.go) now renders:

restartIfChanged = false;
stopIfChanged = false;

on systemd.services.idss-control-plane, so switch-to-configuration leaves its own driver alone. Restart = "on-failure" stays — the exemption is from the switch, not from crash recovery.

Pinned at the unit rather than by discipline in the caller, deliberately: the trap re-arms on every future change to the unit's text, and #790's Nextcloud exports were only what first sprang it. The invariant, stated where a future reader will hit it: a process driving a switch must not live in the cgroup of a unit that switch stops.

Proof

  • Red before green. internal/clan/selfdeploy_driver_test.go — new; reded on all five gateway render shapes (VM private/rented-public/IDIP, full-install kanidm/IDIP) before the change, green after. It also pins that Restart = "on-failure" survives.
  • The rendered module is valid Nix: nix-instantiate --parse over the rendered control-plane surface — PARSE OK.
  • The option names are real, checked against the pinned nixpkgs source in the store, not from memory: restartIfChanged is used throughout nixos/modules/system/boot/systemd.nix; stopIfChanged is consumed by nixos/lib/systemd-lib.nix:819.
  • Full go build ./..., go vet, and go test ./internal/... ./control-plane/... green.
  • Commit 70ed992c on origin/main.

GOTCHAS

  • #84 corrected in the same commit. Its heal (the 90 s restartToleranceMs) is right and stands — as the filing said, the refusal outlasted the window exactly as designed. Its diagnosis was wrong and is now marked so inline: it read the 502 as "a ~1 s window where the control plane was intentionally down" and ruled a 5xx always the restart gap and never a verdict. Its own drive's journal falsifies that (20260825T071850Z:1991 — exit 101, no Started idss-control-plane.service afterwards; there was no gap). New rule added: a refusal that outlasts the window is a finding, not noise — take it to the box's journal, never widen the window to make it go away.
  • #86 appended with the full journal signature, the cgroup-vs-process-group mechanism, and the residue.

One correction to the filing

The secondary ask — fold journalctl -u 'clan-switch-gateway-*' into the deploy fault "so the next recurrence names the panic" — will not name the panic. clan-core wraps the remote activation in systemd-run --pipe (internal/clan/enrollment.go:1083), so switch-to-configuration's stderr goes to the pipe, not the journal — and when the panic is caused by that pipe breaking, the text is written to the broken pipe and lost. That is exactly why grep -i panic finds nothing across all three drives. The journal harvest is still worth doing (the Stopping idss-control-plane / status=101 pair one second apart IS the diagnosis), but it needs the ADR 0039 / #163 per-operation target resolver the deploy seam explicitly declines to fabricate (adapter.go:285-292). Filed as #862 with that correction and a cheap lower-bound alternative.

Residue — left OPEN and named, not swept

  • #861 — the control plane now runs the pre-files env until its next start, so the member-orbit reconciler has no OCS credential until then. Stale beats dead, but it is not closed; the explicit restart that would close it needs the run store persisted first.
  • #862 — a deploy whose remote switch dies still reports only the downstream 502.

What is NOT proven

The 101 only reproduces on a real droplet running a loopback clan machines update, as the filing said. This is seam-proven, not drive-proven. #858 is the sole open blocker of standing-drive #722, so closing it releases the executor — the next deploy-files drive is the verdict, and I am holding this session open to read it.

## Close-report — ruled and fixed **Ruled by agent under ADR 0174 — veto anytime.** The filing suggested `needs-design` for the choice between the two shapes. I did not take that route, and here is why, plus what I ruled. `needs-design` in this repo means *blocked on a missing flow/wireframe* (CLAUDE.md). This is an engineering trade-off with no UI surface, and both shapes are **revertible render changes proven by an existing test** — squarely rule 1 of ADR 0174. It is also not a genuine toss-up once one fact is checked, which the filing flagged as an *open question* rather than resolving. ### The fact that decides it `deployRunStore` (`internal/controlapi/provision.go`) is **in-memory**, and says so in its own comment: *"the run and the store share the control-plane process, so a restart loses both together."* So a control-plane restart makes `GET /api/v1/provision/devices/{id}/deploy` answer **`404 no_deploy`**, and the dashboard's poll reds a definitive 4xx **at once** — #835's `restartToleranceMs` covers 5xx/refused, not 404. That kills **shape 1 (detach the driver)** as a standalone fix. Detaching keeps the CLI alive, but the switch then restarts the control plane *mid-deploy*, losing the live run — trading a 502 red for a 404 red. It is the stronger invariant long-term and should be revisited, but only after the run store is persisted (filed as **#861**). ### Ruling — shape 2, pinned at the unit `gatewayControlPlaneUnit` (`internal/clan/vmguest.go`) now renders: ```nix restartIfChanged = false; stopIfChanged = false; ``` on `systemd.services.idss-control-plane`, so `switch-to-configuration` leaves its own driver alone. `Restart = "on-failure"` **stays** — the exemption is from the *switch*, not from crash recovery. Pinned **at the unit** rather than by discipline in the caller, deliberately: the trap re-arms on every future change to the unit's text, and #790's Nextcloud exports were only what first sprang it. The invariant, stated where a future reader will hit it: **a process driving a switch must not live in the cgroup of a unit that switch stops.** ### Proof - **Red before green.** `internal/clan/selfdeploy_driver_test.go` — new; reded on all **five** gateway render shapes (VM private/rented-public/IDIP, full-install kanidm/IDIP) before the change, green after. It also pins that `Restart = "on-failure"` survives. - **The rendered module is valid Nix**: `nix-instantiate --parse` over the rendered control-plane surface — PARSE OK. - **The option names are real**, checked against the *pinned nixpkgs source in the store*, not from memory: `restartIfChanged` is used throughout `nixos/modules/system/boot/systemd.nix`; `stopIfChanged` is consumed by `nixos/lib/systemd-lib.nix:819`. - Full `go build ./...`, `go vet`, and `go test ./internal/... ./control-plane/...` green. - Commit **`70ed992c`** on `origin/main`. ### GOTCHAS - **#84 corrected in the same commit.** Its heal (the 90 s `restartToleranceMs`) is right and stands — as the filing said, the refusal outlasted the window exactly as designed. Its **diagnosis** was wrong and is now marked so inline: it read the 502 as "a ~1 s window where the control plane was intentionally down" and ruled a 5xx *always* the restart gap and *never* a verdict. Its own drive's journal falsifies that (`20260825T071850Z:1991` — exit 101, no `Started idss-control-plane.service` afterwards; there was no gap). New rule added: *a refusal that outlasts the window is a finding, not noise — take it to the box's journal, never widen the window to make it go away.* - **#86 appended** with the full journal signature, the cgroup-vs-process-group mechanism, and the residue. ### One correction to the filing The secondary ask — fold `journalctl -u 'clan-switch-gateway-*'` into the deploy fault "so the next recurrence names the panic" — **will not name the panic.** clan-core wraps the remote activation in `systemd-run --pipe` (`internal/clan/enrollment.go:1083`), so `switch-to-configuration`'s stderr goes to the **pipe**, not the journal — and when the panic is *caused by that pipe breaking*, the text is written to the broken pipe and lost. That is exactly why `grep -i panic` finds nothing across all three drives. The journal harvest is still worth doing (the `Stopping idss-control-plane` / `status=101` pair one second apart IS the diagnosis), but it needs the ADR 0039 / #163 per-operation target resolver the deploy seam explicitly declines to fabricate (`adapter.go:285-292`). Filed as **#862** with that correction and a cheap lower-bound alternative. ### Residue — left OPEN and named, not swept - **#861** — the control plane now runs the **pre-files env** until its next start, so the member-orbit reconciler has no OCS credential until then. Stale beats dead, but it is not closed; the explicit restart that would close it needs the run store persisted first. - **#862** — a deploy whose remote switch dies still reports only the downstream 502. ### What is NOT proven The 101 only reproduces on a real droplet running a loopback `clan machines update`, as the filing said. This is seam-proven, not drive-proven. #858 is the sole open blocker of standing-drive **#722**, so closing it releases the executor — **the next `deploy-files` drive is the verdict**, and I am holding this session open to read it.
Author
Member

Amendment — I cannot read the verdict; this session is what is blocking it

Correcting the last line of the close-report above ("I am holding this session open to read it"). Closing #858 did release the executor — executor: #722 is ready and unblocked — firing the drive — but the drive then declined to start:

rehearsal: host capacity busy (a swarm/triage/session-runner/healer run holds a slot) — skipped 5 consecutive tick(s);
reservation held (/tmp/matou-drive-wanted) so new heavy work yields to the drive

The session-runner run holding that slot is this one. Waiting for the drive from inside the session that blocks it cannot terminate, so I stopped waiting after ~10 minutes rather than burn the session's budget on a deadlock. The reservation is held, so the drive fires on the first executor tick (every 2 min) after this session exits.

Next session's first step, or whoever reads the next drive: check deploy-files on the first drive after 20260825T212849Z.

  • Green → the fix is drive-proven; #861 (pre-files env, no OCS credential until the next start) is the remaining known gap and should be checked against the member-orbit legs specifically.
  • Red with the same signature (clan-switch-gateway-*.service: Main process exited, code=exited, status=101 + no Started idss-control-plane.service afterwards) → reopen this ticket: the exemption did not take, and the first thing to check is whether the drive's gateway actually carried commit 70ed992c (GOTCHAS #82's class — a green heal is not a landed heal).
  • Red at deploy-files with a DIFFERENT signature → new ticket; the 101 is plugged and something downstream of it is now reachable for the first time in three drives (the files closure has never once activated).
### Amendment — I cannot read the verdict; this session is what is blocking it Correcting the last line of the close-report above ("I am holding this session open to read it"). Closing #858 did release the executor — `executor: #722 is ready and unblocked — firing the drive` — but the drive then declined to start: ``` rehearsal: host capacity busy (a swarm/triage/session-runner/healer run holds a slot) — skipped 5 consecutive tick(s); reservation held (/tmp/matou-drive-wanted) so new heavy work yields to the drive ``` **The session-runner run holding that slot is this one.** Waiting for the drive from inside the session that blocks it cannot terminate, so I stopped waiting after ~10 minutes rather than burn the session's budget on a deadlock. The reservation is held, so the drive fires on the first executor tick (every 2 min) after this session exits. **Next session's first step, or whoever reads the next drive:** check `deploy-files` on the first drive after `20260825T212849Z`. - **Green** → the fix is drive-proven; #861 (pre-files env, no OCS credential until the next start) is the remaining known gap and should be checked against the member-orbit legs specifically. - **Red with the same signature** (`clan-switch-gateway-*.service: Main process exited, code=exited, status=101` + no `Started idss-control-plane.service` afterwards) → reopen this ticket: the exemption did not take, and the first thing to check is whether the drive's gateway actually carried commit `70ed992c` (GOTCHAS #82's class — a green heal is not a landed heal). - **Red at `deploy-files` with a DIFFERENT signature** → new ticket; the 101 is plugged and something downstream of it is now reachable for the first time in three drives (the files closure has never once activated).
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#858
No description provided.