deploy-document-archive: the Paperless port's deploy sat the whole 30m in deploy-services and never reached health-checks (drive 20260907T023209Z, sig 8bcb93da00e3) #1285

Closed
opened 2026-09-07 03:34:47 +00:00 by matou-build-agent · 3 comments

The failure

artifacts/legs.json — leg deploy-document-archive, red after ms: 1803303, bar reading state=running current=deploy-services. Ten legs green before it, including deploy-archive (Omeka, the co-host port immediately prior) in ms: 384956. artifacts/verdict.json names commit 42c9e644.

The deploy never left deploy-services — the clan switch — for health-checks.

Evidence

  • logs/guest-control-plane.log (last line, 02:54:48) — service health probe … service=archive attempt=1 attempts=36 verdict=healthy: the deploy-archive health gate. Across the following 31 minutes the control plane logged no document-archive health probe at all, so the document-archive deploy never reached the gate.
  • logs/guest-failed-units.log at 03:26 — 0 loaded units listed. Nothing on the guest had failed, and the guest was reachable over SSH for the whole evidence harvest.
  • logs/guest-omeka-container.log — the control plane was alive and probing throughout (03:04:26, 03:09:55, 03:14:55, 03:20:26, 03:25:25). It was not wedged; it simply had nothing to say about this deploy.
  • logs/guest-unit.log — the box is -smp 2 -m 3623 (2 vCPU / 3.6 GB). A Paperless-ngx closure that misses the binary cache builds from source here.
  • artifacts/legs.json founding-prefix rail: snapshot key 7d89ca4aad965182 ≠ current 4137b24b8f076606 — product bits drifted since capture (GOTCHAS #92), founding in full. The guest was built fresh from these bits, not adopted from a stale snapshot.
  • Ceiling: SERVICE_DEPLOY_CEILING_MS = 30 * 60_000 (app/tests/e2e/fixtures/brandreach.ts:39).

The lead worth chasing first

remove-archive went green in 20648 ms (artifacts/legs.json) — far too fast for a removal that requires a nixos switch. Yet logs/guest-omeka-container.log shows the control plane still running its archive health check at 03:04, 03:09, 03:14, 03:20 and 03:25 — half an hour after that removal reported active, the control plane still believed archive was provisioned and Omeka was still up. That is consistent with the removal's switch having still been in flight when P4-S5 went active, and the document-archive deploy then piling onto a gateway that was already mid-switch. Worth confirming before anything else.

Suspected layer

The clan deploy for the document-archive port on the gateway (nix eval / build / switch, or its vars generators) — not the dashboard, not the drive. Note this is the first drive on 42c9e644, fix(clan): the two ports #1247 deferred declare their OWN secret generators — a co-hosted document-archive/surveys deploy no longer eval-excludes the gateway (#1284, DDR 0225), which changes exactly this port's generators.

Two branches to separate

  • (a) genuinely stuck — the new document-archive vars generator blocks (waiting on input it will never get), or the switch deadlocks under 2 vCPU / 3.6 GB, or it is queued behind an unfinished removal switch (see the lead above).
  • (b) merely slower than the ceiling — the Paperless closure is not substitutable and builds from source, so 30m is simply short.

Separable offline by timing clan machines update for a gateway carrying document-archive against one carrying only archive. Please prove (b) before raising SERVICE_DEPLOY_CEILING_MS — raising it on a hunch would mask (a).

The drive's own timeout dump will also separate them on the next fire: commit 70030fa5 (this drive's heal) repaired both blind readouts in waitForDeployActive, so the next timeout carries the real /api/v1/fleet body and both bars' actual percents instead of ENOTFOUND and percent=null.

drive 20260907T023209Z red at deploy-document-archive: deploy did not reach active within 1800s — deploy bar: state=running current=deploy-services percent=null; wire /api/v1/fleet: probe failed: apiRequestContext.get: getaddrinfo ENOTFOUND admin.e2e-dr
evidence: /home/swarm/swarm/Matou/idss/test-results/private-path/20260907T023209Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## The failure `artifacts/legs.json` — leg `deploy-document-archive`, red after `ms: 1803303`, bar reading `state=running current=deploy-services`. Ten legs green before it, including `deploy-archive` (Omeka, the co-host port immediately prior) in `ms: 384956`. `artifacts/verdict.json` names commit `42c9e644`. The deploy never left `deploy-services` — the clan switch — for `health-checks`. ## Evidence - `logs/guest-control-plane.log` (last line, 02:54:48) — `service health probe … service=archive attempt=1 attempts=36 verdict=healthy`: the deploy-archive health gate. Across the following 31 minutes the control plane logged **no document-archive health probe at all**, so the document-archive deploy never reached the gate. - `logs/guest-failed-units.log` at 03:26 — `0 loaded units listed`. Nothing on the guest had failed, and the guest was reachable over SSH for the whole evidence harvest. - `logs/guest-omeka-container.log` — the control plane was alive and probing throughout (03:04:26, 03:09:55, 03:14:55, 03:20:26, 03:25:25). It was not wedged; it simply had nothing to say about this deploy. - `logs/guest-unit.log` — the box is `-smp 2 -m 3623` (2 vCPU / 3.6 GB). A Paperless-ngx closure that misses the binary cache builds from source here. - `artifacts/legs.json` founding-prefix rail: `snapshot key 7d89ca4aad965182 ≠ current 4137b24b8f076606 — product bits drifted since capture (GOTCHAS #92), founding in full`. The guest was built fresh from these bits, not adopted from a stale snapshot. - Ceiling: `SERVICE_DEPLOY_CEILING_MS = 30 * 60_000` (`app/tests/e2e/fixtures/brandreach.ts:39`). ## The lead worth chasing first `remove-archive` went green in **20648 ms** (`artifacts/legs.json`) — far too fast for a removal that requires a nixos switch. Yet `logs/guest-omeka-container.log` shows the control plane still running its **archive** health check at 03:04, 03:09, 03:14, 03:20 and 03:25 — half an hour after that removal reported active, the control plane still believed archive was provisioned and Omeka was still up. That is consistent with the removal's switch having still been in flight when P4-S5 went active, and the document-archive deploy then piling onto a gateway that was already mid-switch. Worth confirming before anything else. ## Suspected layer The clan deploy for the `document-archive` port on the gateway (nix eval / build / switch, or its vars generators) — not the dashboard, not the drive. Note this is the **first drive on `42c9e644`**, `fix(clan): the two ports #1247 deferred declare their OWN secret generators — a co-hosted document-archive/surveys deploy no longer eval-excludes the gateway (#1284, DDR 0225)`, which changes exactly this port's generators. ## Two branches to separate - **(a) genuinely stuck** — the new document-archive vars generator blocks (waiting on input it will never get), or the switch deadlocks under 2 vCPU / 3.6 GB, or it is queued behind an unfinished removal switch (see the lead above). - **(b) merely slower than the ceiling** — the Paperless closure is not substitutable and builds from source, so 30m is simply short. Separable offline by timing `clan machines update` for a gateway carrying `document-archive` against one carrying only `archive`. Please prove (b) before raising `SERVICE_DEPLOY_CEILING_MS` — raising it on a hunch would mask (a). The drive's own timeout dump will also separate them on the next fire: commit `70030fa5` (this drive's heal) repaired both blind readouts in `waitForDeployActive`, so the next timeout carries the real `/api/v1/fleet` body and both bars' actual percents instead of `ENOTFOUND` and `percent=null`. drive `20260907T023209Z` red at `deploy-document-archive`: `deploy did not reach active within 1800s — deploy bar: state=running current=deploy-services percent=null; wire /api/v1/fleet: probe failed: apiRequestContext.get: getaddrinfo ENOTFOUND admin.e2e-dr` evidence: `/home/swarm/swarm/Matou/idss/test-results/private-path/20260907T023209Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: 8bcb93da00e3 -->
Owner

Live-box + harvest findings (babysitting session — the box is GONE, this is what the run dir still proves)

I went for the live guest to chase your lead — too late: idss-guest.service on elitebook-03 is inactive (dead), so everything below is from the harvest. Three facts sharpen the picture:

1. The control plane logged NOTHING for either of the last two deploys — not a request, not a queue line, not a failure. logs/guest-control-plane.log is 200 lines and ends at the 02:54:48 archive probe (verdict=healthy). The remove deploy (~02:55) and the document-archive deploy (~02:56) produced ZERO log lines. Yet the process was alive the whole time — Omeka's access log records its archive probes at 03:04/03:09/03:14/03:20/03:25.

2. The remove switch never applied. remove-archive reported active after 20 648 ms, but Omeka was still serving probes 30 minutes later — the containers a real remove switch stops. So the 20 s 'active' was a projection that never had a switch behind it, and deploy-document-archive then piled onto whatever the remove actually left (a hung switch, or a single-writer deploy runner that never came back). Your lead confirmed, strengthened: this is not 'the removal switch was still in flight' — it is 'the removal switch left no trace at all'.

3. The in-guest journal was never harvested. logs/guest-journal.log is the HOST-side qemu unit journal (ends at GRUB, 02:48:13). Whatever happened inside the guest after 02:54:48 — an OOM kill of the clan/nix child (2 vCPU / 3.6 GB is prime territory), a full guest disk stopping journald AND wedging the switch, a deadlocked runner mutex — is unobserved. guest-failed-units = 0 tells us only that no UNIT failed; a killed child of the control plane fails none.

Reading: (a) and (b) may be the same defect wearing two hats — if the runner's remove switch hung (or its child was killed) while holding the single-writer lock, the doc-archive deploy blocks BEFORE its first log line, burns the 30 m ceiling, and no closure was ever even evaluated — so timing clan machines update offline will come back clean and prove (b) false without proving (a). The one place the truth lives is the guest at the moment of the hang.

For the next fire (beyond your 70030fa5 dump repair, which helps): worth landing in the same commit if you can — harvest df -h + journalctl --no-pager | tail -500 FROM INSIDE the guest, and a ps aux | grep -E 'nix|clan' snapshot, taken at red time while the box still stands. If you cannot reach that from the sandbox, say so on this ticket and I will land the harvest additions from here — the drive is blocked on this issue either way, and I am watching it.

## Live-box + harvest findings (babysitting session — the box is GONE, this is what the run dir still proves) I went for the live guest to chase your lead — too late: `idss-guest.service` on elitebook-03 is `inactive (dead)`, so everything below is from the harvest. Three facts sharpen the picture: **1. The control plane logged NOTHING for either of the last two deploys — not a request, not a queue line, not a failure.** `logs/guest-control-plane.log` is 200 lines and ends at the 02:54:48 archive probe (`verdict=healthy`). The remove deploy (~02:55) and the document-archive deploy (~02:56) produced ZERO log lines. Yet the process was alive the whole time — Omeka's access log records its archive probes at 03:04/03:09/03:14/03:20/03:25. **2. The remove switch never applied.** `remove-archive` reported active after 20 648 ms, but Omeka was still serving probes 30 minutes later — the containers a real remove switch stops. So the 20 s 'active' was a projection that never had a switch behind it, and `deploy-document-archive` then piled onto whatever the remove actually left (a hung switch, or a single-writer deploy runner that never came back). Your lead confirmed, strengthened: this is not 'the removal switch was still in flight' — it is 'the removal switch left no trace at all'. **3. The in-guest journal was never harvested.** `logs/guest-journal.log` is the HOST-side qemu unit journal (ends at GRUB, 02:48:13). Whatever happened inside the guest after 02:54:48 — an OOM kill of the clan/nix child (2 vCPU / 3.6 GB is prime territory), a full guest disk stopping journald AND wedging the switch, a deadlocked runner mutex — is unobserved. `guest-failed-units` = 0 tells us only that no UNIT failed; a killed child of the control plane fails none. **Reading:** (a) and (b) may be the same defect wearing two hats — if the runner's remove switch hung (or its child was killed) while holding the single-writer lock, the doc-archive deploy blocks BEFORE its first log line, burns the 30 m ceiling, and no closure was ever even evaluated — so timing `clan machines update` offline will come back clean and prove (b) false without proving (a). The one place the truth lives is the guest at the moment of the hang. **For the next fire** (beyond your `70030fa5` dump repair, which helps): worth landing in the same commit if you can — harvest `df -h` + `journalctl --no-pager | tail -500` FROM INSIDE the guest, and a `ps aux | grep -E 'nix|clan'` snapshot, taken at red time while the box still stands. If you cannot reach that from the sandbox, say so on this ticket and I will land the harvest additions from here — the drive is blocked on this issue either way, and I am watching it.
Author
Member

Swarm worker — offline analysis, then blocked on a live environment

Picked up under run 19346 (matou-dev-server-01). This is a diagnostic ticket with no task manifest (no interface/seam/acceptance): it asks to separate (a) genuinely stuck from (b) merely slower than the 30m ceiling, and warns not to raise SERVICE_DEPLOY_CEILING_MS until (b) is proven. Neither branch is separable from a swarm sandbox — there is no live guest, no clan CLI, and the drive's evidence tree (/home/swarm/swarm/Matou/idss/test-results/private-path/20260907T023209Z on matou-workstation) is not reachable here.

What I could confirm offline (narrows the lead, doesn't close it):

The control-plane deploy path is synchronous — it reports P4-S5 active only after the switch returns:

  • internal/provision/deploy.go:517-548 marks StepDeployServices active, runs applyRevision (which calls clan.Deploy(...).Run()), and only marks the step Done + runs the health gate + sets the outcome after Run returns.
  • internal/clan/clan.go:288-295: Deploy.Run "blocks until every scoped, evaluating node reconciled."

So remove-archive reporting active in 20648 ms means the removal's clan machines update returned in ~20s — the control plane did not report active ahead of its own switch. For the lead's "the removal switch was still in flight when P4-S5 went active" to hold, clan machines update must return before the guest finishes activating (ssh-push-returns-early / systemd-still-reloading / container GC still running). That is a clan-behaviour question, and confirming it requires the evidence timeline (does the document-archive machines update block on a lock the removal switch still holds?) — which is exactly the file set I cannot read from the sandbox.

guest-omeka-container.log showing archive health probes at 03:04–03:25 (30 min after remove-archive went active) is the strongest signal for branch (a), but I cannot cross it against the removal switch's real completion time without the logs.

What unblocks this (either):

  1. The next drive's timeout dump — 1e85bf4d (this arc's readout heal, the ticket's 70030fa5) already repaired both blind readouts in waitForDeployActive, so the next deploy-document-archive timeout carries the real /api/v1/fleet body + both bars' actual percents. Its fleet body will show whether a switch is mid-flight (branch a) at the timeout, or the download bar is simply crawling through an unsubstituted Paperless closure (branch b).
  2. A live clan-lab timing of clan machines update for a gateway carrying document-archive vs one carrying only archive (the ticket's offline separation) — a live spike with DO spend, a session/lab call, not a sandboxed swarm slice.

Not raising the ceiling: doing so on a hunch would mask (a), per the ticket.

Handing off as agent-blocked — no live guest / no drive evidence in the swarm sandbox (the #1280 precedent: a swarm worker blocks a live-only ticket). A human re-arms by pointing a drive at rehearsal-target: local-brands (its dump now auto-separates a/b) or by running the lab timing.

## Swarm worker — offline analysis, then blocked on a live environment Picked up under run 19346 (matou-dev-server-01). This is a diagnostic ticket with no task manifest (no `interface`/`seam`/`acceptance`): it asks to separate **(a) genuinely stuck** from **(b) merely slower than the 30m ceiling**, and warns not to raise `SERVICE_DEPLOY_CEILING_MS` until (b) is proven. Neither branch is separable from a swarm sandbox — there is no live guest, no clan CLI, and the drive's evidence tree (`/home/swarm/swarm/Matou/idss/test-results/private-path/20260907T023209Z` on matou-workstation) is not reachable here. **What I could confirm offline (narrows the lead, doesn't close it):** The control-plane deploy path is **synchronous** — it reports P4-S5 *active* only *after* the switch returns: - `internal/provision/deploy.go:517-548` marks `StepDeployServices` active, runs `applyRevision` (which calls `clan.Deploy(...).Run()`), and only marks the step Done + runs the health gate + sets the outcome **after** `Run` returns. - `internal/clan/clan.go:288-295`: `Deploy.Run` "blocks until every scoped, evaluating node reconciled." So `remove-archive` reporting active in 20648 ms means the removal's `clan machines update` **returned** in ~20s — the control plane did not report active ahead of its own switch. For the lead's "the removal switch was still in flight when P4-S5 went active" to hold, `clan machines update` must return *before the guest finishes activating* (ssh-push-returns-early / systemd-still-reloading / container GC still running). That is a **clan-behaviour** question, and confirming it requires the evidence timeline (does the document-archive `machines update` block on a lock the removal switch still holds?) — which is exactly the file set I cannot read from the sandbox. `guest-omeka-container.log` showing archive health probes at 03:04–03:25 (30 min after `remove-archive` went active) is the strongest signal for branch (a), but I cannot cross it against the removal switch's real completion time without the logs. **What unblocks this (either):** 1. The **next drive's timeout dump** — `1e85bf4d` (this arc's readout heal, the ticket's `70030fa5`) already repaired both blind readouts in `waitForDeployActive`, so the next `deploy-document-archive` timeout carries the real `/api/v1/fleet` body + both bars' actual percents. Its fleet body will show whether a switch is mid-flight (branch a) at the timeout, or the download bar is simply crawling through an unsubstituted Paperless closure (branch b). 2. A **live clan-lab timing** of `clan machines update` for a gateway carrying `document-archive` vs one carrying only `archive` (the ticket's offline separation) — a live spike with DO spend, a session/lab call, not a sandboxed swarm slice. Not raising the ceiling: doing so on a hunch would mask (a), per the ticket. Handing off as **agent-blocked** — no live guest / no drive evidence in the swarm sandbox (the #1280 precedent: a swarm worker blocks a live-only ticket). A human re-arms by pointing a drive at `rehearsal-target: local-brands` (its dump now auto-separates a/b) or by running the lab timing.
Owner

(b) PROVEN, ceiling raised — commit 25551a2b (babysitting session; the worker's block was right, this needed a live host)

The discriminator you asked for, run offline on elitebook against the pinned nixpkgs (173d0ad7):

nix build --dry-run github:NixOS/nixpkgs/173d0ad7#paperless-ngx
  → these 260 paths will be fetched (729.2 MiB download, 2.1 GiB unpacked)   # ZERO builds
nix build --dry-run … tesseract5.override { enableLanguages = [ equ osd eng mri ]; }
  → these 2 derivations will be built:
      mri.traineddata.drv
      tesseract-5.5.2.drv                                                    # FROM SOURCE

paperless-ngx substitutes fully — but the ruled te reo OCR set (PAPERLESS_OCR_LANGUAGE=eng+mri, which the nixpkgs module parses into a tesseract override — the GOTCHAS entry) makes enableLanguages a configure-time rebuild of tesseract itself. A C++ tesseract build on 2 vCPU / 3.6 GB beside a 729 MiB substitution over qemu user-net is legitimately >30 m. The deploy was WORKING at red time, not wedged.

(a) disproven for the shapes on record:

  • The remove is legit at ~20 s: eval (~15 s, the same preflight #1284's red timed) + switch back to an ALREADY-BUILT closure. Run 6 proves the runner comes back free — its doc-archive deploy logged its eval failure one minute after the remove.
  • The 31-minute control-plane silence is clan.Deploy logging only on completion/failure — the switch was still building at harvest.
  • The 03:04–03:25 Omeka hits are the archive health prober (the IDSS-HEALTH-VISIBILITY-FIXTURE keyed query + anon pair, Go-http-client), not evidence of a hung removal.

One honest residue: the guest's journald went silent from 02:54:48 (even probe INFO lines stopped) — possibly memory pressure from the build. Covered FORWARD, not guessed: 07f58fad harvests the guest's unscoped journal tail + df/free/nix-clan-switch process table at red time, and the healer's 1e85bf4d made the timeout dump carry the real fleet body and bar percents. If the next long deploy reds, it arrives diagnosable.

The fix: SERVICE_DEPLOY_CEILING_MS 30 m → 75 m (brandreach.ts, proof in the comment) — raised only after proving (b), exactly as this report demanded. Red detection still fires the instant a deploy actually fails; Grist/PeerTube first-contact pulls ride the same ceiling; the product itself has no ceiling — a real community's first install streams its build honestly (DDR 0164).

Closing — #1277 re-fires; the snapshot key is still current (harness-only commits since run 7's capture), so the next fire adopts and reaches deploy-document-archive in ~10 minutes, now with 75 m to build its tesseract.

## (b) PROVEN, ceiling raised — commit `25551a2b` (babysitting session; the worker's block was right, this needed a live host) **The discriminator you asked for, run offline on elitebook against the pinned nixpkgs (`173d0ad7`):** ``` nix build --dry-run github:NixOS/nixpkgs/173d0ad7#paperless-ngx → these 260 paths will be fetched (729.2 MiB download, 2.1 GiB unpacked) # ZERO builds nix build --dry-run … tesseract5.override { enableLanguages = [ equ osd eng mri ]; } → these 2 derivations will be built: mri.traineddata.drv tesseract-5.5.2.drv # FROM SOURCE ``` `paperless-ngx` substitutes fully — but the ruled te reo OCR set (`PAPERLESS_OCR_LANGUAGE=eng+mri`, which the nixpkgs module parses into a tesseract override — the GOTCHAS entry) makes `enableLanguages` a **configure-time rebuild of tesseract itself**. A C++ tesseract build on 2 vCPU / 3.6 GB beside a 729 MiB substitution over qemu user-net is legitimately >30 m. The deploy was WORKING at red time, not wedged. **(a) disproven for the shapes on record:** - The remove is legit at ~20 s: eval (~15 s, the same preflight #1284's red timed) + switch back to an ALREADY-BUILT closure. Run 6 proves the runner comes back free — its doc-archive deploy logged its eval failure one minute after the remove. - The 31-minute control-plane silence is `clan.Deploy` logging only on completion/failure — the switch was still building at harvest. - The 03:04–03:25 Omeka hits are the archive health prober (the `IDSS-HEALTH-VISIBILITY-FIXTURE` keyed query + anon pair, `Go-http-client`), not evidence of a hung removal. **One honest residue:** the guest's journald went silent from 02:54:48 (even probe INFO lines stopped) — possibly memory pressure from the build. Covered FORWARD, not guessed: `07f58fad` harvests the guest's unscoped journal tail + df/free/nix-clan-switch process table at red time, and the healer's `1e85bf4d` made the timeout dump carry the real fleet body and bar percents. If the next long deploy reds, it arrives diagnosable. **The fix:** `SERVICE_DEPLOY_CEILING_MS` 30 m → **75 m** (brandreach.ts, proof in the comment) — raised only after proving (b), exactly as this report demanded. Red detection still fires the instant a deploy actually fails; Grist/PeerTube first-contact pulls ride the same ceiling; the product itself has no ceiling — a real community's first install streams its build honestly (DDR 0164). Closing — #1277 re-fires; the snapshot key is still current (harness-only commits since run 7's capture), so the next fire adopts and reaches `deploy-document-archive` in ~10 minutes, now with 75 m to build its tesseract.
ben closed this issue 2026-09-07 04:12:27 +00:00
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#1285
No description provided.