Files
memory/systems/hermes-agent-01.md
T
2026-10-08 22:00:16 +00:00

45 lines
3.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
category: systems
tags: [hermes-host, runner, systemd, backup, housekeeping, watchdog]
updated: 2026-10-08
---
# systems/hermes-agent-01 — Lokaler Hermes-Runner
## Identity
- Debian 12, Kernel 6.1.0-53-amd64, Root-FS **79G ext4 (/dev/sda1)** — historisch knappe Resource!
- Rolle: Hermes-Agent-Host (Telegram-Gateway, Crond, Playwright, avahi `hermes-agent-01.local`);
Arbeitstiers laufen aus `~/hermes-agent` Worktree (`venv/bin/python -m hermes-cli main`).
## Storage-Governance (Stand 08.10., nach Krisenwoche)
- **Worst Case erlebt:** 96–100 % volles Root-FS (10./08.10.) → korrupte write_file-Writes (mid-stream truncation); Syntax-Checker fing 2× korrupte Dateien.
- Aktuell: **59 % belegt, 32 G frei** (von 96 % morgens).
- **Permanenter Guards:**
- journald: Drop-in `/etc/systemd/journald.conf.d/sizecap.conf` → `SystemMaxUse=200M` (1017M→199M)
- uv-Cache: Guard-Cron `624a2f98fb10` (So 09:00, no_agent, Skript `clean_uv_cache.sh`, Threshold 3 GiB, leise wenn drunter)
- **Podman bereinigt (08.10.):** 160 → 15 Images, ~23 G freigegeben (Inventory: `~/podman_inventory_2026-10-08.txt`). `schoenkitchen:latest` wurde versehentlich mitgeprünt (Namensregel-Fehler beim Pin-Container) → aus Git-Quelle rebuildet (`8c439711ceef`, 168 MB).
- Producer der alten Krise: siehe Backup unten (tarballs in /tmp ohne Limit).
## Backup-Pipeline (produzierend seit 08.10.)
- systemd `hermes-backup.timer` 04:00 UTC → `hermes-backup.service` (User debian) → `~/.hermes/scripts/backup-to-s3.sh`
- Ziel: Norris S3 `rgw.nbg.nsc.noris.cloud`, Bucket `homelab-hermes-backup`, Retention 14 Tage; Creds via 1P Item `postgres-s3-backup` (Vault Kubernetes ESO).
- **RCA 08.10.:** Exit 127 `aws: command not found` seit ≥27.09. (systemd-PATH ohne `~/.local/bin`) → Offsite TOOT + /tmp-Vollauf. Fix: Skript (absoluter AWS_BIN + `trap ... EXIT`-Cleanup) + Drop-in `/etc/systemd/system/hermes-backup.service.d/override.conf` (PATH + TimeoutStartSec 3600). Produktionslauf verifiziert (SUCCESS, S3-Readback 2.284.533.218 B). → PAT-015.
- Belt-and-braces: manuelle Tarballs liegen zusätzlich auf NAS `10.0.20.100:/pool01_n2_redundant/backups/hermes-host/` (10 Stück, SHA256-verifiziert).
## Watchdogs (lokal registriert)
- **NUT UPS Watchdog** Cron `4cbf03ccb4de` (1/min): rohes NUT-Proto gegen 10.0.20.92:3493, quiet-if-OK → Wiki systems/nut.
- **uv Cache Guard** Cron `624a2f98fb10` (So 09:00).
- HA-Backup-Alter Checker `2006a91fba21` (tägl. 12:00, Schwelle 30 h).
## Gotchas dieses Hosts
- systemd/cron kennen `~/.local/bin` NICHT (aws, uv!) → Absolutpfade oder Drop-ins. PAT-015.
- Root-FS-Volllauf = Korruptionsquelle Nr. 1 (write_file mid-stream truncation) — vor großen Writes Platz checken.
- Terminal-Foreground verbietet `&`-Konstrukte; Async nur via `background=true`.
- PDF-Generation via `/home/debian/.venvs/pdfkit/bin/python3` (PEP-668 sperrt System-pip).
- `~/.hermes/state.db` 1,84 G + Snapshots 507 M — größte Nicht-Container-Posten.
## Related
- [[systems/nut]] — UPS-Watchdog-Detail
- [[reference/emhass-cascade]], [[systems/homeassistant]]
- docs/solutions/bug-fixes/2026-10-08-hermes-offsite-backup-aws-path-rca.md