From a3914a1d4155717a6b439f6f546af61287374df5 Mon Sep 17 00:00:00 2001 From: dtoro Date: Wed, 29 Jul 2026 23:03:27 +0200 Subject: [PATCH] fix(checks): process check is opt-in for url-fronted services MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ontology's stated intent was "http when it has a url, else a process check", but the implementation emitted BOTH for every url-service — so ~17 fronted services carried a redundant process check that, under worst-of aggregation, let a fragile supplementary probe (wrong unit name, unreachable host, no guest agent) veto two healthy http checks and report the service "down" while it was up (authentik, zimaos, house, matrix, ...). buildKind now emits a process check only for services WITHOUT a url, or when an explicit probe_unit opts into binary-level depth. http is the canonical service-liveness probe (tests the real endpoint through the TLS terminator); the redundant process checks were removed. --- internal/checkdefaults/defaults.go | 10 ++++++++++ seeds/inventory.yaml | 9 +++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/internal/checkdefaults/defaults.go b/internal/checkdefaults/defaults.go index 9614b23..5f86e18 100644 --- a/internal/checkdefaults/defaults.go +++ b/internal/checkdefaults/defaults.go @@ -213,7 +213,17 @@ func buildKind(kind string, t Target, attrs map[string]any, host, user string, p break } } + // Ontology intent: "http when it has a url, else a process check." A + // url-fronted service is already liveness-probed via http (the real + // endpoint, through the TLS terminator); the process check is redundant + // and fragile (needs host access + the exact unit/container name), and + // under worst-of aggregation it lets a broken supplementary probe veto + // a working service. Emit it only for services WITHOUT a url, or when + // an explicit probe_unit opts into binary-level depth. if unit == "" { + if httpURL(t, attrs) != "" { + return nil, "url present and no probe_unit; http check covers liveness" + } unit = t.Name } if unit == "" { diff --git a/seeds/inventory.yaml b/seeds/inventory.yaml index 44dd9ac..147e26b 100644 --- a/seeds/inventory.yaml +++ b/seeds/inventory.yaml @@ -217,8 +217,7 @@ entities: - {slug: "service:proxmox-ui", type: service, name: proxmox_ui, attributes: {url: "https://proxmox.hubris.network", port: 8006, doc_page: knowledge/wiki/hosts/hubris.md, - risk_notes: "hypervisor UI — changes affect every guest on the node", - probe_unit: pveproxy.service}} + risk_notes: "hypervisor UI — changes affect every guest on the node"}} - {slug: "service:gitea", type: service, name: gitea, attributes: {url: "https://git.hubris.network", port: 3000, doc_page: knowledge/wiki/containers/104-gitea.md, @@ -240,8 +239,7 @@ entities: risk_notes: "native Authentik OIDC (no forward-auth gate); VAAPI depends on GPU passthrough on strong"}} - {slug: "service:nextcloud", type: service, name: nextcloud, attributes: {url: "https://cloud.hubris.network", - doc_page: knowledge/wiki/containers/114-nextcloud.md, - probe_unit: apache2.service}} + doc_page: knowledge/wiki/containers/114-nextcloud.md}} - {slug: "service:paperless", type: service, name: paperless, attributes: {url: "https://paperless.hubris.network", doc_page: knowledge/wiki/containers/103-paperless.md, @@ -252,8 +250,7 @@ entities: risk_notes: "alert/approval channel for Oikos — outage silences agent escalation"}} - {slug: "service:photos", type: service, name: photos, attributes: {url: "https://photos.hubris.network", - doc_page: knowledge/wiki/containers/120-mule-images.md, - probe_unit: pp-app}} + doc_page: knowledge/wiki/containers/120-mule-images.md}} - {slug: "service:arr-stack", type: service, name: arr_stack, attributes: {doc_page: knowledge/wiki/containers/122-arriman.md, note: "jellyseerr / qbit / sab on docker compose"}}