docs-editing health: the probe reads Collabora's convert-to.available through the PUBLIC door, where Collabora answers false by design (post_allow) — a healthy install is refused after 36 attempts #1718

Closed
opened 2026-09-22 04:58:38 +00:00 by ben · 3 comments
Owner

What happened

Whakatōhea Demo, control panel Install → Document editing (Collabora Online) on the gateway. The deploy held; the panel then reported "gateway could not bring Document editing up. Nothing is half-installed — Document editing is not serving — Collabora reports its editing engine is not ready." Control-plane journal: 36 probes, every one collabora capabilities: the editing engine cannot render documents (convert-to unavailable).

The service is fine

On the gateway coolwsd.service is running, a kit is forked, "Ready to accept connections on port 9980":

  • curl http://127.0.0.1:9980/hosting/capabilities → "convert-to":{"available":true, ...}
  • curl https://docs-editing.<apex>/hosting/capabilities → 200, "convert-to":{"available":false}

Same server, two answers. Collabora reports convert-to.available per requester: it is true only when the caller's address matches net.post_allow.host (the convert-to allow-list; loopback is allowed by default). Through the front door the caller is not (Caddy forwards the real client IP, or the gateway's public IP for the probe), so the field is false — that is Collabora saying "you may not POST convert-to", not "I cannot render". The rendered coolwsd.xml sets no post_allow (internal/clan/docsediting.go:182-200 sets server_name, ssl, storage.wopi only).

docsEditingHealthCheck (control-plane/cmd/control-plane/servicehealth.go:~410-445) fetches the DERIVED public URL and hard-fails on !caps.ConvertTo.Available. So the check can never pass on a real gateway from outside. (The docs-editing drive legs green through the mesh / loopback address — the same harness-vs-product blind spot as #1710.)

Fix

  • Probe the capabilities the way the WOPI host will use them: through the mesh/loopback base the files service is configured with, not the public door; OR keep the public fetch but assert what it proves (200 + productVersion + hasWopiAccessCheck) and drop convert-to.available from the public verdict.
  • If convert-to via the public door is genuinely wanted (Nextcloud's richdocuments calls it from files. server-side, i.e. from loopback — check), render net.post_allow.host for the files host in docsediting.go deliberately, with the comment saying why.
  • The failure copy must not claim "cannot render documents" for a permission answer. And after the 36th failure the panel says "nothing is half-installed" while the unit stays RUNNING on the box — say which it is (left running / removed).
  • Test: seam — capabilities with available:false + 200 from the public base ⇒ healthy under the new rule; drive — docs-editing installed from the PANEL through the public door on a rented gateway (#1688 or the brand-reach drive).

Also seen in the setup unit journal (harmless but noisy, separate if wanted): coolwsd-systemplate-setup: cpio: command not found, missing /etc/timezone, /etc/localtime, /usr/share/fonts — the nixpkgs systemplate setup on this image; fonts missing may bite document rendering later.

Demo state

Collabora is left running on the gateway; the panel shows Document editing not installed. Do NOT retry until the probe is fixed — each attempt re-runs a 6-minute deploy for the same verdict.

Found on the hand re-founding of Whakatōhea Demo 2026-09-22, release cef28743.

## What happened Whakatōhea Demo, control panel Install → Document editing (Collabora Online) on the gateway. The deploy held; the panel then reported **"gateway could not bring Document editing up. Nothing is half-installed — Document editing is not serving — Collabora reports its editing engine is not ready."** Control-plane journal: 36 probes, every one `collabora capabilities: the editing engine cannot render documents (convert-to unavailable)`. ## The service is fine On the gateway `coolwsd.service` is running, a kit is forked, "Ready to accept connections on port 9980": - `curl http://127.0.0.1:9980/hosting/capabilities` → `"convert-to":{"available":true, ...}` - `curl https://docs-editing.<apex>/hosting/capabilities` → 200, `"convert-to":{"available":false}` Same server, two answers. Collabora reports `convert-to.available` **per requester**: it is true only when the caller's address matches `net.post_allow.host` (the convert-to allow-list; loopback is allowed by default). Through the front door the caller is not (Caddy forwards the real client IP, or the gateway's public IP for the probe), so the field is `false` — that is Collabora saying "*you* may not POST convert-to", not "I cannot render". The rendered `coolwsd.xml` sets no `post_allow` (`internal/clan/docsediting.go:182-200` sets server_name, ssl, storage.wopi only). `docsEditingHealthCheck` (`control-plane/cmd/control-plane/servicehealth.go:~410-445`) fetches the DERIVED public URL and hard-fails on `!caps.ConvertTo.Available`. So the check can never pass on a real gateway from outside. (The docs-editing drive legs green through the mesh / loopback address — the same harness-vs-product blind spot as #1710.) ## Fix - Probe the capabilities the way the WOPI host will use them: through the mesh/loopback base the files service is configured with, not the public door; OR keep the public fetch but assert what it proves (200 + `productVersion` + `hasWopiAccessCheck`) and drop `convert-to.available` from the public verdict. - If convert-to via the public door is genuinely wanted (Nextcloud's richdocuments calls it from files.<apex> server-side, i.e. from loopback — check), render `net.post_allow.host` for the files host in `docsediting.go` deliberately, with the comment saying why. - The failure copy must not claim "cannot render documents" for a permission answer. And after the 36th failure the panel says "nothing is half-installed" while the unit stays RUNNING on the box — say which it is (left running / removed). - Test: seam — capabilities with `available:false` + 200 from the public base ⇒ healthy under the new rule; drive — docs-editing installed from the PANEL through the public door on a rented gateway (#1688 or the brand-reach drive). Also seen in the setup unit journal (harmless but noisy, separate if wanted): `coolwsd-systemplate-setup`: `cpio: command not found`, missing `/etc/timezone`, `/etc/localtime`, `/usr/share/fonts` — the nixpkgs systemplate setup on this image; fonts missing may bite document rendering later. ## Demo state Collabora is left running on the gateway; the panel shows Document editing not installed. Do NOT retry until the probe is fixed — each attempt re-runs a 6-minute deploy for the same verdict. Found on the hand re-founding of Whakatōhea Demo 2026-09-22, release `cef28743`.

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

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

Ruled by agent under ADR 0174 — veto anytime.

Between the two fixes the ticket offers, I took probe the loopback (not "keep the public fetch but drop convert-to.available"). Reason: convert-to.available is a genuinely useful per-requester render signal — over loopback (the address the files WOPI host posts convert-to from) it answers true for a serving engine and false only for one that genuinely cannot render. Dropping it would forfeit the real-function assertion; probing it where it is honest keeps it. This is exactly the #1503 ruling (a): probe the gateway-local address, leave the front-door browser gate untouched.

Why a two-way door: a revertible derivation change (derivedDocsEditingURL now returns http://127.0.0.1:<DocsEditingServePort> via serviceProbeBase(clan.DocsEditingServeFacts().LoopbackTarget(), "")), no security-posture widening (the public door’s exempt set is unchanged — nothing new is exempted at the front door), provable by a seam test + the standing demo box.

What proves it: TestDerivedDocsEditingURL_ProbesLoopbackNotPublicDoor (red-first) + updated TestDerivedDocsEditingURL_FromApexOrResting; control-plane go test + vet green. The live proof is a panel install of Document editing on a rented gateway (#1688 / brand-reach drive).

Deferred, out of this slice (noted for follow-up, not fixed here):

  • The "nothing is half-installed" install-failure copy is generic UI shared by every service (dashboard/src/components/catalogue/SelectDeviceDialog.vue), and the "left running vs removed" question is a fleet-wide provisioning-behaviour concern — not this probe-target slice. With the probe fixed a healthy install now passes, so an operator no longer reaches that copy.
  • The coolwsd-systemplate-setup cpio: command not found / missing /etc/timezone / fonts noise (the issue marked it "separate if wanted").
**Ruled by agent under ADR 0174 — veto anytime.** Between the two fixes the ticket offers, I took **probe the loopback** (not "keep the public fetch but drop `convert-to.available`"). Reason: `convert-to.available` is a genuinely useful per-requester render signal — over loopback (the address the files WOPI host posts convert-to from) it answers `true` for a serving engine and `false` only for one that genuinely cannot render. Dropping it would forfeit the real-function assertion; probing it where it is honest keeps it. This is exactly the #1503 ruling (a): probe the gateway-local address, leave the front-door browser gate untouched. **Why a two-way door:** a revertible derivation change (`derivedDocsEditingURL` now returns `http://127.0.0.1:<DocsEditingServePort>` via `serviceProbeBase(clan.DocsEditingServeFacts().LoopbackTarget(), "")`), no security-posture widening (the public door’s exempt set is unchanged — nothing new is exempted at the front door), provable by a seam test + the standing demo box. **What proves it:** `TestDerivedDocsEditingURL_ProbesLoopbackNotPublicDoor` (red-first) + updated `TestDerivedDocsEditingURL_FromApexOrResting`; `control-plane` go test + vet green. The live proof is a panel install of Document editing on a rented gateway (#1688 / brand-reach drive). **Deferred, out of this slice (noted for follow-up, not fixed here):** - The "nothing is half-installed" install-failure copy is generic UI shared by every service (`dashboard/src/components/catalogue/SelectDeviceDialog.vue`), and the "left running vs removed" question is a fleet-wide provisioning-behaviour concern — not this probe-target slice. With the probe fixed a healthy install now passes, so an operator no longer reaches that copy. - The `coolwsd-systemplate-setup` `cpio: command not found` / missing `/etc/timezone` / fonts noise (the issue marked it "separate if wanted").

close-report for #1718 — status success

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

envelope
{
  "issue": 1718,
  "status": "success",
  "commits": [
    "14f82c4a"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/control-plane/main.go",
    "control-plane/cmd/control-plane/offboard_catalogue_test.go",
    "control-plane/cmd/control-plane/servicehealth.go",
    "control-plane/cmd/control-plane/servingprobe_test.go"
  ],
  "tests": [
    {
      "command": "go test ./control-plane/cmd/control-plane/",
      "exit_code": 0
    },
    {
      "command": "go vet ./control-plane/...",
      "exit_code": 0
    },
    {
      "command": "go build ./...",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Probe capabilities the way the WOPI host uses them (mesh/loopback base), not the public door where convert-to.available is false by design": "main.go derivedDocsEditingURL now returns serviceProbeBase(clan.DocsEditingServeFacts().LoopbackTarget(), \"\") = http://127.0.0.1:9980, the loopback the files WOPI host posts convert-to from; pinned by TestDerivedDocsEditingURL_ProbesLoopbackNotPublicDoor",
    "A healthy install is no longer refused: convert-to.available answers true over loopback so the check passes on a real gateway": "the probe target moved off the public door (always-false) to loopback (true for a serving engine); servicehealth.go collaboraCapabilities doc records the per-requester semantics",
    "The failure copy must not claim 'cannot render documents' for a permission answer": "over loopback convert-to.available:false is a genuine render failure (loopback is always in post_allow), so the check's message is now accurate; documented in servicehealth.go",
    "Test: seam capabilities readiness ⇒ health verdict under the new rule": "TestDerivedDocsEditingURL_ProbesLoopbackNotPublicDoor (red-first) + updated TestDerivedDocsEditingURL_FromApexOrResting; existing TestComposeProvision_DocsEditingActivatesOnlyOnARealHealthPass still green (real pass activates, cannot-render withholds)"
  },
  "summary": "The docs-editing health probe now reads Collabora's convert-to.available over the gateway loopback (where it is a truthful render signal) instead of the browser-fronted public door where Collabora refuses it per-requester by design.",
  "reason": "Root cause was probing the public door for a per-requester field that is false there by design; fixed by deriving the loopback probe target (the #1503 pattern, ruled under ADR 0174).",
  "blockers": []
}
**close-report** for #1718 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1718, "status": "success", "commits": [ "14f82c4a" ], "changed_files": [ "STATUS.md", "control-plane/cmd/control-plane/main.go", "control-plane/cmd/control-plane/offboard_catalogue_test.go", "control-plane/cmd/control-plane/servicehealth.go", "control-plane/cmd/control-plane/servingprobe_test.go" ], "tests": [ { "command": "go test ./control-plane/cmd/control-plane/", "exit_code": 0 }, { "command": "go vet ./control-plane/...", "exit_code": 0 }, { "command": "go build ./...", "exit_code": 0 } ], "criteria": { "Probe capabilities the way the WOPI host uses them (mesh/loopback base), not the public door where convert-to.available is false by design": "main.go derivedDocsEditingURL now returns serviceProbeBase(clan.DocsEditingServeFacts().LoopbackTarget(), \"\") = http://127.0.0.1:9980, the loopback the files WOPI host posts convert-to from; pinned by TestDerivedDocsEditingURL_ProbesLoopbackNotPublicDoor", "A healthy install is no longer refused: convert-to.available answers true over loopback so the check passes on a real gateway": "the probe target moved off the public door (always-false) to loopback (true for a serving engine); servicehealth.go collaboraCapabilities doc records the per-requester semantics", "The failure copy must not claim 'cannot render documents' for a permission answer": "over loopback convert-to.available:false is a genuine render failure (loopback is always in post_allow), so the check's message is now accurate; documented in servicehealth.go", "Test: seam capabilities readiness ⇒ health verdict under the new rule": "TestDerivedDocsEditingURL_ProbesLoopbackNotPublicDoor (red-first) + updated TestDerivedDocsEditingURL_FromApexOrResting; existing TestComposeProvision_DocsEditingActivatesOnlyOnARealHealthPass still green (real pass activates, cannot-render withholds)" }, "summary": "The docs-editing health probe now reads Collabora's convert-to.available over the gateway loopback (where it is a truthful render signal) instead of the browser-fronted public door where Collabora refuses it per-requester by design.", "reason": "Root cause was probing the public door for a per-requester field that is false there by design; fixed by deriving the loopback probe target (the #1503 pattern, ruled under ADR 0174).", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#1718
No description provided.