deploy-takeover: kexec installer built from source on gateway, SIGKILLed at 20m bound #1037

Closed
opened 2026-08-30 16:06:27 +00:00 by matou-build-agent · 2 comments

What failed

artifacts/verdict.json — 27 legs, 26 green, 1 red, 0 skips:

{"verdict": "red", "target": "device", "legs": {"total": 27, "green": 26, "red": 1, "skip": 0}, "firstRedLeg": "deploy-takeover", "commit": "e765e18ebd7847fb98cde626cedbfb89f2b4511e"}

The journey ran the whole member-device arc — device-create, agent-install, decline-resume, join, approve, assess, select-files all green — and died on the last leg, deploy-takeover, after 1 303 464 ms (21m43s).

This is not the KNOWN frontier. The brief names pairing-never-flips (the own-VPS carrier issue) as the standing red. In this drive pair is green ({"leg":"pair","status":"green","ms":130}) and legs.json carries no skip reasons at all — no leg in this run declares anything out of scope. The frontier has moved one leg past pairing, to the takeover deploy.

The evidence

artifacts/legs.json / artifacts/journey.json (.fault), and the same string in logs/gateway-journal.txt:1990:

time=2026-08-30T16:00:48.408Z level=WARN msg="provision deploy failed" component=control-plane device=node-req-0003
  error="clan: config_eval on node-req-0003: the takeover's kexec installer image for node-req-0003 is
  STILL BUILDING after 20m0s — bounded and red LOUD (nothing erased) rather than burn the deploy budget
  behind a silent build. A cold nix store with no substituter serving the static closure builds it from
  source; warm the store or carry the closure (#1016).:
  nix build of the kexec installer tarball for node-req-0003 exited 137:

The build log carried in that error shows the gateway store was cold for the installer closure:

these 303 derivations will be built:
  /nix/store/83b7jm2xlwii1a7bm1ws6yx221fhzd93-ssh-root-provision.conf.drv
  ...
building '/nix/store/4djh9y6b83zvr0s7hipyy03s3i85ngdv-initrd-linux-6.18.45.drv'...
building '/nix/store/n22q2rbcfsi9jcv99rhq479a7wvls024-nixos-system-nixos-installer-kexec-26.05pre-git.drv'...
building '/nix/store/r7vgq9mfj5zp3vcgl1bj4z7frjnwynlf-squashfs.img.drv'...
building '/nix/store/1vxpaiag3zpzpvixibh861ci51izf2gz-initrd.drv'...

and was fetching a fresh static toolchain + kernel from upstream to do it:

copying path '/nix/store/mxdij41zzxwz0ixg401d9nsai7r7qpka-linux-6.18.45' from 'https://cache.nixos.org'...
copying path '/nix/store/a819dazknmbg0qs6jyc7bic5449qqbmf-musl-static-x86_64-unknown-linux-musl-1.2.5' from 'https://cache.nixos.org'...
copying path '/nix/store/pc1c1xkh5pi6ck3zd6bxlrnha5fx12ik-kexec-tools-2.0.32.tar.xz' from 'https://cache.nixos.org'...

That is a full compose from source — exactly the shape ADR 0133 Tier 3 was amended to prevent. The verdict's own commit is e765e18, whose message reads "the payload carries the kexec-installer-base closure and founding seeds it into the GATEWAY's store, so the member-device takeover's on-box installer compose runs warm". The drive ran that commit and the compose was still cold.

Corroborating: logs/founding-state.log records every founding stage and contains no installer-base seeding step. Its only closure transfer is the gateway system itself —

"stage": "enroll-copy", "message": "copying the system onto the gateway — 754 store paths"

— and greps for installer-base, kexec, 0133, 1036, substituter, warm across founding-state.log, gateway-journal.txt and broker-journal.txt return nothing but an unrelated resolver line. The seed either never ran or never logged.

A second hazard, visible in the same build log, would defeat the seed even once it does run — the generated on-box flake has no lockfile, so its nixpkgs is resolved fresh at eval time:

warning: not writing modified lock file of flake 'path:/tmp/idss-installer-node-req-0003-986380948':
• Added input 'nixos-images':
    'github:nix-community/nixos-images/f6714acc84ce92df7286c89a571ad1e946057a5b?narHash=...' (2026-08-27)
• Added input 'nixos-images/nixos-stable':
    'git+https://github.com/NixOS/nixpkgs?ref=nixos-26.05&rev=a9e6d84f9c2f9012f5fe7d964a7851352300e61a&shallow=1' (2026-08-22)
• Added input 'nixos-images/nixos-unstable':
    'git+https://github.com/NixOS/nixpkgs?ref=nixpkgs-unstable&rev=89570f24e97e614aa34aa9ab1c927b6578a43775&shallow=1' (2026-06-23)

Every input is Added, i.e. resolved from scratch. A carried closure built against any other revs would hash to different store paths and be silently ignored — the store would be "warm" and the compose would still rebuild 303 derivations.

Exit 137 is the bound, not an OOM

logs/gateway-journal.txt has no oom-kill, no Killed process, and no systemd-oomd kill — only the startup note systemd-oomd[2319]: No swap; memory pressure usage will be degraded (line 854). logs/gateway-stall.txt at 16:02:13 shows the box healthy with the build already gone: Mem: 3921 total / 3316 free, load average: 2.74, 5.14, 3.61, disk 8.9G/78G, and no nix build or nix-daemon process left in the process dump. So the 137 is the product's own 20m SIGKILL firing as designed. The bound behaved correctly; what it bounded is the defect.

The target box is untouched, as the "nothing erased" promise says: logs/device-units.txt shows node-req-0003 still the stock Ubuntu droplet — LISTEN 0 4096 0.0.0.0:22 users:(("sshd",pid=1082,fd=3)), no NixOS units, systemctl --failed empty — and logs/device-stall.txt shows /dev/vda1 77G 2.0G 75G 3% / with an empty === nix-daemon journal === section. Nothing was half-taken-over.

Suspected layer

Product, at the gateway control plane's takeover path. Not infra: the gateway reached cache.nixos.org fine, had 65 GB free and 3.3 GB RAM available, and no unit failed. Not harness: the drive drove all 27 legs, captured the fault, and the 20m bound is the product's own guard. The defect is that the ADR 0133 Tier 3 warm-store guarantee is not in force at the commit that claims it.

What plugging it needs

  1. Find out whether founding seeds at all. founding-state.log has no stage for it. Either the seeding step is not wired into the founding sequence the rehearsal exercises, or it runs unlogged — which for a step whose whole job is to prevent a 20-minute silent build is itself the bug. It needs a stage row naming the store path it copied and its size.
  2. Pin the on-box flake. Emit a flake.lock (or --override-input) into /tmp/idss-installer-<node>-* fixing nixos-images and both nixpkgs to the exact revs the carried kexec-installer-base was built from. Without this the seed is a coin-flip against whatever nixos-26.05 and nixpkgs-unstable resolve to on the day.
  3. Make the miss loud early, not at minute 20. Before starting the build, assert the seeded base path is present in the gateway store and is the one the flake will evaluate to; fail in seconds with "seeded base X, flake wants Y" instead of burning the whole deploy budget and reporting a generic cold-store message. The current error text already guesses the right cause — it should be able to state it.

Absent / not consulted

  • No live-box section was appended to this brief — no access line, no read-only limits, so I ran nothing against either droplet and diagnosed from the harvested logs alone. Both boxes were evidently still up when the harness dumped at ~16:02 (artifacts/droplet-ip.txt → 168.144.172.10, gateway; device at 209.38.16.24), so a live check of the gateway's /nix/store for the seeded base would settle finding (1) outright and is the first thing to do if a box is still reachable.
  • logs/droplet-journal.txt does not exist. This drive splits it into logs/gateway-journal.txt (492 KB) and logs/device-journal.txt (171 KB); both were read.
  • logs/healer-claude.err shows the auto-healer never ran for this red: /home/swarm/swarm/Matou/idss/.sandcastle/rehearsal-report.sh: line 257: /usr/bin/timeout: Argument list too long. The fault string is ~146 KB (the entire nix build log) and the report script passes it as an argv. That is a separate harness defect worth its own ticket: it silences the healer on precisely the failure class that produces large build logs. reporter-claude.err is empty and healer-claude.out is 1 byte.

drive 20260830T152228Z red at deploy-takeover: deploy failed (rescue): clan: config_eval on node-req-0003: the takeover's kexec installer image for node-req-0003 is STILL BUILDING after 20m0s — bounded and red LOUD (nothing erased) rather than b
evidence: /home/swarm/swarm/Matou/idss/test-results/drive-device/20260830T152228Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## What failed `artifacts/verdict.json` — 27 legs, 26 green, 1 red, **0 skips**: ```json {"verdict": "red", "target": "device", "legs": {"total": 27, "green": 26, "red": 1, "skip": 0}, "firstRedLeg": "deploy-takeover", "commit": "e765e18ebd7847fb98cde626cedbfb89f2b4511e"} ``` The journey ran the whole member-device arc — `device-create`, `agent-install`, `decline-resume`, `join`, `approve`, `assess`, `select-files` all green — and died on the last leg, `deploy-takeover`, after **1 303 464 ms (21m43s)**. **This is not the KNOWN frontier.** The brief names pairing-never-flips (the own-VPS carrier issue) as the standing red. In this drive `pair` is green (`{"leg":"pair","status":"green","ms":130}`) and `legs.json` carries **no skip reasons at all** — no leg in this run declares anything out of scope. The frontier has moved one leg past pairing, to the takeover deploy. ## The evidence `artifacts/legs.json` / `artifacts/journey.json` (`.fault`), and the same string in `logs/gateway-journal.txt:1990`: ``` time=2026-08-30T16:00:48.408Z level=WARN msg="provision deploy failed" component=control-plane device=node-req-0003 error="clan: config_eval on node-req-0003: the takeover's kexec installer image for node-req-0003 is STILL BUILDING after 20m0s — bounded and red LOUD (nothing erased) rather than burn the deploy budget behind a silent build. A cold nix store with no substituter serving the static closure builds it from source; warm the store or carry the closure (#1016).: nix build of the kexec installer tarball for node-req-0003 exited 137: ``` The build log carried in that error shows the gateway store was **cold for the installer closure**: ``` these 303 derivations will be built: /nix/store/83b7jm2xlwii1a7bm1ws6yx221fhzd93-ssh-root-provision.conf.drv ... building '/nix/store/4djh9y6b83zvr0s7hipyy03s3i85ngdv-initrd-linux-6.18.45.drv'... building '/nix/store/n22q2rbcfsi9jcv99rhq479a7wvls024-nixos-system-nixos-installer-kexec-26.05pre-git.drv'... building '/nix/store/r7vgq9mfj5zp3vcgl1bj4z7frjnwynlf-squashfs.img.drv'... building '/nix/store/1vxpaiag3zpzpvixibh861ci51izf2gz-initrd.drv'... ``` and was fetching a fresh static toolchain + kernel from upstream to do it: ``` copying path '/nix/store/mxdij41zzxwz0ixg401d9nsai7r7qpka-linux-6.18.45' from 'https://cache.nixos.org'... copying path '/nix/store/a819dazknmbg0qs6jyc7bic5449qqbmf-musl-static-x86_64-unknown-linux-musl-1.2.5' from 'https://cache.nixos.org'... copying path '/nix/store/pc1c1xkh5pi6ck3zd6bxlrnha5fx12ik-kexec-tools-2.0.32.tar.xz' from 'https://cache.nixos.org'... ``` That is a full compose from source — exactly the shape ADR 0133 Tier 3 was amended to prevent. The verdict's own `commit` is `e765e18`, whose message reads *"the payload carries the kexec-installer-base closure and founding seeds it into the GATEWAY's store, so the member-device takeover's on-box installer compose runs warm"*. **The drive ran that commit and the compose was still cold.** Corroborating: `logs/founding-state.log` records every founding stage and contains **no installer-base seeding step**. Its only closure transfer is the gateway system itself — ``` "stage": "enroll-copy", "message": "copying the system onto the gateway — 754 store paths" ``` — and greps for `installer-base`, `kexec`, `0133`, `1036`, `substituter`, `warm` across `founding-state.log`, `gateway-journal.txt` and `broker-journal.txt` return nothing but an unrelated resolver line. The seed either never ran or never logged. A second hazard, visible in the same build log, would defeat the seed even once it does run — the generated on-box flake has **no lockfile**, so its nixpkgs is resolved fresh at eval time: ``` warning: not writing modified lock file of flake 'path:/tmp/idss-installer-node-req-0003-986380948': • Added input 'nixos-images': 'github:nix-community/nixos-images/f6714acc84ce92df7286c89a571ad1e946057a5b?narHash=...' (2026-08-27) • Added input 'nixos-images/nixos-stable': 'git+https://github.com/NixOS/nixpkgs?ref=nixos-26.05&rev=a9e6d84f9c2f9012f5fe7d964a7851352300e61a&shallow=1' (2026-08-22) • Added input 'nixos-images/nixos-unstable': 'git+https://github.com/NixOS/nixpkgs?ref=nixpkgs-unstable&rev=89570f24e97e614aa34aa9ab1c927b6578a43775&shallow=1' (2026-06-23) ``` Every input is *Added*, i.e. resolved from scratch. A carried closure built against any other revs would hash to different store paths and be silently ignored — the store would be "warm" and the compose would still rebuild 303 derivations. ## Exit 137 is the bound, not an OOM `logs/gateway-journal.txt` has no `oom-kill`, no `Killed process`, and no `systemd-oomd` kill — only the startup note `systemd-oomd[2319]: No swap; memory pressure usage will be degraded` (line 854). `logs/gateway-stall.txt` at 16:02:13 shows the box healthy with the build already gone: `Mem: 3921 total / 3316 free`, `load average: 2.74, 5.14, 3.61`, disk `8.9G/78G`, and **no nix build or nix-daemon process left in the process dump**. So the 137 is the product's own 20m SIGKILL firing as designed. The bound behaved correctly; what it bounded is the defect. The target box is untouched, as the "nothing erased" promise says: `logs/device-units.txt` shows `node-req-0003` still the stock Ubuntu droplet — `LISTEN 0 4096 0.0.0.0:22 users:(("sshd",pid=1082,fd=3))`, no NixOS units, `systemctl --failed` empty — and `logs/device-stall.txt` shows `/dev/vda1 77G 2.0G 75G 3% /` with an empty `=== nix-daemon journal ===` section. Nothing was half-taken-over. ## Suspected layer **Product**, at the gateway control plane's takeover path. Not infra: the gateway reached `cache.nixos.org` fine, had 65 GB free and 3.3 GB RAM available, and no unit failed. Not harness: the drive drove all 27 legs, captured the fault, and the 20m bound is the product's own guard. The defect is that the ADR 0133 Tier 3 warm-store guarantee is not in force at the commit that claims it. ## What plugging it needs 1. **Find out whether founding seeds at all.** `founding-state.log` has no stage for it. Either the seeding step is not wired into the founding sequence the rehearsal exercises, or it runs unlogged — which for a step whose whole job is to prevent a 20-minute silent build is itself the bug. It needs a stage row naming the store path it copied and its size. 2. **Pin the on-box flake.** Emit a `flake.lock` (or `--override-input`) into `/tmp/idss-installer-<node>-*` fixing `nixos-images` and both nixpkgs to the exact revs the carried `kexec-installer-base` was built from. Without this the seed is a coin-flip against whatever `nixos-26.05` and `nixpkgs-unstable` resolve to on the day. 3. **Make the miss loud early, not at minute 20.** Before starting the build, assert the seeded base path is present in the gateway store and is the one the flake will evaluate to; fail in seconds with "seeded base X, flake wants Y" instead of burning the whole deploy budget and reporting a generic cold-store message. The current error text already guesses the right cause — it should be able to *state* it. ## Absent / not consulted - **No live-box section was appended to this brief** — no access line, no read-only limits, so I ran nothing against either droplet and diagnosed from the harvested logs alone. Both boxes were evidently still up when the harness dumped at ~16:02 (`artifacts/droplet-ip.txt` → `168.144.172.10`, gateway; device at `209.38.16.24`), so a live check of the gateway's `/nix/store` for the seeded base would settle finding (1) outright and is the first thing to do if a box is still reachable. - **`logs/droplet-journal.txt` does not exist.** This drive splits it into `logs/gateway-journal.txt` (492 KB) and `logs/device-journal.txt` (171 KB); both were read. - **`logs/healer-claude.err` shows the auto-healer never ran** for this red: `/home/swarm/swarm/Matou/idss/.sandcastle/rehearsal-report.sh: line 257: /usr/bin/timeout: Argument list too long`. The fault string is ~146 KB (the entire nix build log) and the report script passes it as an argv. That is a separate **harness** defect worth its own ticket: it silences the healer on precisely the failure class that produces large build logs. `reporter-claude.err` is empty and `healer-claude.out` is 1 byte. drive `20260830T152228Z` red at `deploy-takeover`: `deploy failed (rescue): clan: config_eval on node-req-0003: the takeover's kexec installer image for node-req-0003 is STILL BUILDING after 20m0s — bounded and red LOUD (nothing erased) rather than b` evidence: `/home/swarm/swarm/Matou/idss/test-results/drive-device/20260830T152228Z` 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

swarm-claim host=matou-dev-server-01 run=14623
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=14623 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

close-report for #1037 — status success

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

envelope
{
  "issue": 1037,
  "status": "success",
  "commits": [
    "cd56dbb8"
  ],
  "changed_files": [
    "internal/fleetwire/supply.go",
    "internal/fleetwire/supply_test.go",
    "app/helper/cmd/helper/wiring_prod.go",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "go test -count=1 ./internal/fleetwire/...",
      "exit_code": 0
    },
    {
      "command": "go build ./...",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/fleetwire/...",
      "exit_code": 0
    },
    {
      "command": "gofmt -l internal/fleetwire/ app/helper/cmd/helper/wiring_prod.go",
      "exit_code": 0
    }
  ],
  "criteria": {
    "The Tier-3 installer-base seed emits an observable stage instead of being silent (finding #1)": "internal/fleetwire/supply.go seedInstallerBase now logs on every branch (no-cache Info, already-warm Info+base, seeded Info naming base store path + byte size + narinfo count, import-failed Warn naming the failed step); proven by TestSupplySeed_InstallerBaseLogs{ImportWhenCold,SkipWhenAlreadyImported,AbsentWhenPayloadLacksCache,FailureDegrade}",
    "The seed's failure still degrades to today's from-source build (ADR 0133 intact)": "the step error is still swallowed after the WARN; TestSupplySeed_InstallerBaseImportNeverFailsSeed stays green (Seed returns nil on a failed import)",
    "The seed's voice reaches production harvested logs": "app/helper/cmd/helper/wiring_prod.go wires fleetwire.WithSupplyLog(fleetLog()) on both guest-supply and rented-supply",
    "Finding #2 (flake-lock path mismatch) adjudicated": "verified a RED HERRING and NOT changed: flake.lock pins nixos-images/nixos-stable=a9e6d84f and nixos-unstable=89570f24 (exactly the on-box compose revs in the evidence); both warm build (flake.nix packages.kexec-installer-base) and on-box compose (internal/clan/installer_image.go) read nixos-images.inputs.nixos-stable at the same pinned nixos-images rev, so store paths match — documented in the commit and STATUS.md"
  },
  "summary": "The ADR 0133 Tier-3 installer-base seed now emits an honest stage on every branch (absent/already-warm/seeded-with-path-size-count/failed-degrade) so the next drive can distinguish a cold takeover from a silent-success seed; finding #2 verified a red herring; finding #3 left as follow-up.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #1037 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1037, "status": "success", "commits": [ "cd56dbb8" ], "changed_files": [ "internal/fleetwire/supply.go", "internal/fleetwire/supply_test.go", "app/helper/cmd/helper/wiring_prod.go", "STATUS.md" ], "tests": [ { "command": "go test -count=1 ./internal/fleetwire/...", "exit_code": 0 }, { "command": "go build ./...", "exit_code": 0 }, { "command": "go vet ./internal/fleetwire/...", "exit_code": 0 }, { "command": "gofmt -l internal/fleetwire/ app/helper/cmd/helper/wiring_prod.go", "exit_code": 0 } ], "criteria": { "The Tier-3 installer-base seed emits an observable stage instead of being silent (finding #1)": "internal/fleetwire/supply.go seedInstallerBase now logs on every branch (no-cache Info, already-warm Info+base, seeded Info naming base store path + byte size + narinfo count, import-failed Warn naming the failed step); proven by TestSupplySeed_InstallerBaseLogs{ImportWhenCold,SkipWhenAlreadyImported,AbsentWhenPayloadLacksCache,FailureDegrade}", "The seed's failure still degrades to today's from-source build (ADR 0133 intact)": "the step error is still swallowed after the WARN; TestSupplySeed_InstallerBaseImportNeverFailsSeed stays green (Seed returns nil on a failed import)", "The seed's voice reaches production harvested logs": "app/helper/cmd/helper/wiring_prod.go wires fleetwire.WithSupplyLog(fleetLog()) on both guest-supply and rented-supply", "Finding #2 (flake-lock path mismatch) adjudicated": "verified a RED HERRING and NOT changed: flake.lock pins nixos-images/nixos-stable=a9e6d84f and nixos-unstable=89570f24 (exactly the on-box compose revs in the evidence); both warm build (flake.nix packages.kexec-installer-base) and on-box compose (internal/clan/installer_image.go) read nixos-images.inputs.nixos-stable at the same pinned nixos-images rev, so store paths match — documented in the commit and STATUS.md" }, "summary": "The ADR 0133 Tier-3 installer-base seed now emits an honest stage on every branch (absent/already-warm/seeded-with-path-size-count/failed-degrade) so the next drive can distinguish a cold takeover from a silent-success seed; finding #2 verified a red herring; finding #3 left as follow-up.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#1037
No description provided.