my-homelab-configs/infra/jeannie-eventd
juvenal.diaz 4850c31335
Homelab Main / validate (push) Waiting to run Details
Homelab Main / running-update (push) Blocked by required conditions Details
Homelab Main / debian-ops (push) Blocked by required conditions Details
Render valid self-heal working directory and verify units before install
2026-10-30 09:47:32 -06:00
..
README.md Render valid self-heal working directory and verify units before install 2026-10-30 09:47:32 -06:00
alertmanager-route.example.yaml feat: scope disk self-healing to Pimox workers 2026-10-21 10:38:36 -06:00
free-disk-space-failed.sample.json feat: add first Jeannie self-heal alert loop 2026-10-07 09:05:25 -06:00
jeannie-eventd.service Bind self-healing to the selected cluster and route residual cleanup directly 2026-10-30 08:02:21 -06:00
stale-residual-pods.sample.json feat: self-heal stale residual pods 2026-10-07 15:07:24 -06:00

README.md

Jeannie self-heal webhook

Install or reconcile the webhook from the checkout used for operations:

LAB_CLUSTER_PROFILE=pimox ./jeannie self-heal install-service --apply

The installer records the selected profile, explicit kubeconfig, and current checkout path in the systemd unit. It restarts the webhook so new source and environment settings take effect. Without --apply, installation defaults to dry-run mode unless LAB_SELF_HEAL_APPLY=true is explicitly supplied. The rendered file is staged with its .service filename and checked using systemd-analyze verify --man=no on Debian before replacing the installed unit. An invalid rendered unit therefore leaves the existing unit file untouched.

HomelabStaleResidualPods, KubePodEvicted, and KubePodContainerStatusUnknown select the guarded stale-pod cleanup directly. They do not invoke the broad doctor planner or choose unrelated VM restarts. The cleanup only selects supported residual states on controller-owned pods; Completed/Succeeded and ordinary Pending pods are not cleanup targets. It does not delete PVCs or change worker CPU configuration. Debian automatic disk cleanup remains disabled.

Doctor stdout and stderr are stored separately under ~/.local/share/homelab/self-heal-events/<event>/. The .log file contains stdout (JSON for the doctor), .stderr.log contains diagnostics, and result.json records the chosen command and outcome. Generic cleanup verification checks eligible residual records rather than requiring all unrelated Pending workloads to become healthy.

Read-only validation:

systemctl is-active jeannie-eventd
systemctl show jeannie-eventd -p Environment --value
LAB_CLUSTER_PROFILE=pimox ./jeannie heal cleanup-stale-pods

Alertmanager repeats matching firing alerts according to its configured route (currently one hour for this receiver); service installation does not itself trigger a cleanup. Existing failed/completed pod objects do not prove that their replacement workloads are unhealthy; Pending workloads need separate scheduling diagnosis.