ProDG Mainframe — Consolidated Improvement Master Plan

Created: 2026-10-25 Source: the 8 runs of the Mainframe improvement scout cron job (job 7a7d2457c5fc) Owner: sudo (Mitch) Status: proposed — not yet executed

Why this exists

The scout deduplicates only against the single previous run (context_from: self, most-recent-only injection), so recommendations from runs #1–#6 were never reconciled against each other. This document summarises all 8 runs, de-duplicates them into cross-cutting themes, and sequences them into a plan ordered by real exposure to loss — not by the order they were discovered.

Source inventory (8 runs)

RunDateFocusHeadline recommendation
#12026-10-04Security (OpenBao/Wazuh/LiteLLM)OpenBao 2.6 EOL → 2.7.x; Wazuh upgrade; pin LiteLLM by digest
#22026-10-07Backup/DRB2 SSE default; Talos etcd snapshots; dump-to-stdin; B2 lifecycle
#32026-10-10Talos/K8ssandboxd workload isolation; Talos 1.14.1; registry config format
#42026-10-13Cost/efficiencyCompose resource limits; Redis encodings; PG autovacuum; MinIO baseline
#52026-10-16Observability/toolsAlerting blind spots; scrape unmonitored components; Loki ruler; smartctl_exporter + Gatus; Caddy forward_auth gap
#62026-10-19K8s/Talos opsTalos 1.14.2→1.14.4; zero etcd backups; tombstone cleanup + 2nd etcd member; Pod Security
#72026-10-22LiteLLMBudget alerting; daily cap; scrape to Grafana; bump 1.104.5
#82026-10-25Backup/DRDR docs are AWS templates; OpenBao single-copy; no PITR; never restored; etcd unprotected

Verification performed (2026-10-25, live box)

Confirmed by direct inspection, not taken on the scout's word:

  • ✅ Backup orchestrator exists (/opt/prodg/backups/scripts/backup-all.sh → postgres + minio + configs), last run green, B2 holds daily pg_dumpall_*.sql.gz (~1.9 MB) through 2026-10-25.
  • ✅ No pgBackRest anywhere (host or postgres container) and logical dumps only → no PITR. Backups are nightly, RPO = 24 h.
  • ✅ Zero etcd snapshots anywhere on the estate (find for *etcd* returns nothing).
  • ✅ Prometheus rule_files: [] — no file-based alert rules (Grafana-managed rules exist separately).
  • ✅ docs/security/Disaster_Recovery_Plan.md is the untouched Hack23 AB AWS template (owner "CEO James Pether Sörling", next review 2026-07-25 — overdue).
  • ✅ Backup trigger is the Hermes cron job prodg-backup-daily; there is no systemd timer for it → backups stop silently if Hermes is down.
  • ✅ rclone remote prodg-b2: exists and is the only offsite target.
  • ✅ OpenBao raft store and .unseal-shares are co-located at /opt/prodg/data/openbao/.
  • 🆕 New finding (not in any scout run): MinIO's 3 buckets (prodg-artifacts, prodg-backups, prodg-logs) are all empty and have been since 2026-04-27. The nightly MinIO "backup" is vacuous by design (it warns "this backup protects nothing"). MinIO is running and consuming resources for zero live data.

Cross-cutting themes (de-duplicated)

  1. Backups exist but recovery is unproven and coverage is partial. Runs #2, #6, #8 all circle this. Offsite pipeline is real; what's missing is (a) anything ever restored, (b) PITR, (c) etcd, (d) OpenBao secrets.
  2. Single-copy trust anchors. OpenBao secrets, Talos etcd, and the DR documentation are each single points of failure.
  3. Monitoring is half-wired. Grafana alerting works; Prometheus has no rules; the components whose failure means data loss (Postgres/Redis/MinIO/OpenBao) aren't scraped at all; Loki's ruler points at a non-existent Alertmanager.
  4. Version currency / patching. OpenBao (EOL branch), Talos 1.14.2, LiteLLM 1.104.0, Wazuh — all have safe minor bumps available with security content.
  5. Least-privilege gaps. B2 app key can delete its own backups; LiteLLM master key used off-UI; forward_auth missing for ~10 basic_auth services; no Pod Security admission.
  6. Efficiency hygiene. No compose resource limits, untuned Redis/Postgres, and an apparently unused MinIO.

The plan (phased, ordered by exposure)

Effort estimates are the scout's, sanity-checked. src = originating run(s).

Phase 0 — Stop the bleeding (this week)

#ActionEffortWhy it matterssrc
0.1Run a restore drill end-to-end — pull a pg_dumpall from B2 into a throwaway Postgres, note timing, write /opt/prodg/backups/restore-runbook.md + drill log~1 hNothing has ever been restored; backups are unproven until one is. Highest-value single item.#8.4
0.2Snapshot OpenBao off-host — bao operator raft snapshot save + .unseal-shares shipped to B2 (separate path), added to the orchestrator~1 hRaft store + unseal shares live on one host; losing it loses every secret. No autosnapshot upstream (openbao#795).#8.2
0.3Back up Talos etcd — systemd timer: talosctl etcd snapshot → rclone copy to B2 (age-encrypt, reuse the support-prodg-trackc.zip.age key), daily + pre-upgrade, 30-day retentionmedZero etcd snapshots in the estate; single-member control plane.#6.2, #8.5, #2.2
0.4Move the backup trigger off Hermes — systemd timer running backup-all.sh; retire the prodg-backup-daily cron job~30 minToday backups stop silently whenever Hermes is down.#8.4
0.5Lock down the backup target — B2 Object Lock (governance, 30–90 d) + swap to a write-only app key~1 hCurrent key can delete its own backups → ransomware/operator error wipes the only copy.#8.4, #2.4

Phase 1 — Close coverage & compliance (next 2 weeks)

#ActionEffortWhy it matterssrc
1.1Rewrite DR/BCP/Backup docs to describe the actual estate: per-service RTO/RPO + the real B2 restore runbook; replace the Hack23 AWS templates~3 hAn AWS-doc DR plan in a bank/defence-grade ISMS is worse than blank — it's an untruth. Review is already overdue.#8.1
1.2PITR via pgBackRest 2.5x → B2 S3 endpoint — cipher_type=aes-256-cbc, WAL archive-push on a 60 s loopmed-high (~4 h)Takes RPO from 24 h to minutes + restore-to-timestamp.#8.3
1.3B2 lifecycle + encryption defaults — lifecycle rules on the backup bucket; SSE for any new bucketlowAuto-expiry meets retention, default-encrypts new streams.#2.1, #2.4
1.4File-based Prometheus alert rules — restart-loop, OpenBao sealed (bao_core_unsealed == 0), TLS cert expiry, backup-freshness (textfile stamp from the backup script); confirm the Grafana contact point actually pages the right chatlowrule_files: [] today; a sealed OpenBao or a stalled backup currently pages no one.#5.1, #7.3
1.5Scrape the data-bearing components — Postgres, Redis, MinIO, OpenBao exporters into prometheus.yml; enable LiteLLM /metrics callbacklow-medOnly 9 of 47 containers are scraped; these four failing silently = data loss, not a missing graph.#5.2, #7.3

Phase 2 — Harden trust anchors (next month)

#ActionEffortWhy it matterssrc
2.1OpenBao 2.6 → 2.7.xlow2.6 is EOL; 2.7 is the only branch getting security patches.#1.1
2.2Wazuh → current 4.14.xlowRecent cluster-sync / keystore hardening; confirm API+indexer are tailnet-only.#1.2
2.3LiteLLM hygiene — pin image by digest, audit proxy_admin holders, retire the master key from off-UI callers, add $5/1d cap, alerting → Mattermost, bump to 1.104.5low-medTrust anchor for AI credentials; today a runaway key can burn the month's budget silently.#1.3, #7.1, #7.2, #7.4
2.4Pod Security admission — Talos cluster.apiServer.admissionControl: enforce baseline, audit/warn restricted; exempt tailscale/kube-systemlowNo namespace enforces Pod Security today.#6.4
2.5Talos 1.14.2 → 1.14.4 — snapshot etcd first (single CP), expect a short API bliplow (~10 min)Carries the DHCP-address-change fix (the .56/.57 churn) + KubePrism recovery fix.#6.1
2.6Talos sandboxd workload isolation — after CSI migration checkmedReal security boundary around kubelet/pods.#3.1
2.7Caddy forward_auth for basic_auth services — oauth2-proxy or caddy-security front of ZitadelmedZitadel has no native ForwardAuth (#6912); ~10 services sit on basic_auth.#5 auth
2.8Fix Loki ruler / add Alertmanager — no Alertmanager exists at prometheus:9093lowLog-based alerts currently go nowhere.#5.3

Phase 3 — Efficiency & hygiene (backlog)

#ActionEffortWhy it matterssrc
3.1Compose resource limits (CPU/mem) after docker stats baselinelowOne service starving others during a load spike.#4.1
3.2Redis tuning — compact encodings + activedefragmed30–50% memory savings on cache/session data.#4.2
3.3Postgres autovacuum tuning — lower scale factors for Twenty CRM's churnlowPrevents bloat-driven query slowdown as data grows.#4.3
3.4Drive-health coverage — smartctl_exporter (S.M.A.R.T. for the KVM host disks)medZero drive-health visibility today.#5.4
3.5Add Gatus — YAML outside-in probes incl. [CERTIFICATE_EXPIRATION]medChecks Prometheus structurally can't do.#5.4
3.6Talos etcd redundancy — boot convert-test as a real second etcd member; clear stale Node/pod tombstoneslow-medOne-member etcd is the actual cluster SPOF.#6.3
3.7Registry config format migration — .machine.registries → RegistryMirrorConfiglowFuture-proofs the 192.168.100.1:5000 mirror.#3.4
3.8Decide on MinIO — all 3 buckets empty since Apr; either put real data in it or decommission to reclaim resourceslow🆕 New: it's running for zero live data; its "backup" protects nothing.verification

Deliberately deferred / rejected

  • Tag-based LiteLLM budgets — silently skipped upstream (#27480). Don't enforce on tags.
  • Authentik / Pocket ID — redundant; Zitadel already runs the self-hosted login.
  • Talos native BGP (run #3.3) — no current routing scenario needs it; keep as a note only.
  • Minor jump to LiteLLM 1.106.x — not worth it for a billing fix; 1.104.5 is enough.

Open questions for sudo

  1. B2 Object Lock is irreversible-ish (governance mode conflicts with the current rclone delete retention logic). Phase 0.5 and 1.3 must be reconciled — replace age-based rclone delete with lifecycle+Object Lock, or Object Lock will make the bucket un-prunable.
  2. Target RTO per service? The doc rewrite (1.1) needs numbers only you can set.
  3. Keep MinIO or retire it? Affects whether its backup stays in the orchestrator.

Suggested execution order

0.4 → 0.5 → 0.1 → 0.2 → 0.3 (make backups tamper-proof and provable first), then Phase 1, then 2, then 3 as capacity allows. Phase 0.4/0.5 are prerequisites for a trustworthy Phase 1.