upstream replication 컬렉터는 수신 LSN != 재생 LSN이면 now()-마지막 트랜잭션 재생 시각을 지연으로 보고한다. replica 재시작 직후에는 수신 LSN이 세그먼트 시작점(재생 LSN보다 작음)에 머물러 유휴 프라이머리에서 지연이 무한히 커진다(실측 116초→281초, 트랜잭션 1건 뒤 0). DbReplicationLag가 pending으로 올라갔다. 수신 LSN <= 재생 LSN이면 0으로 보는 custom query로 교체하고 upstream replication 컬렉터를 끈다. pg_replication_is_replica도 같은 쿼리에서 낸다.
selfheal-lab-gitops
GitOps and configuration repository for the self-healing verification lab
(VM + container mixed environment). Infrastructure lives in
seon-labs/selfheal-lab-terraform; this repository holds everything that runs
on top of it.
This repository is public on purpose: every EC2 node and GCE VM clones it anonymously at first boot (cloud-init / startup script), and MIG instances are recreated by autohealing without an operator. Never commit secrets here; values live in GCP Secret Manager and are fetched at runtime.
| Path | Owner | Filled in |
|---|---|---|
bootstrap/kubeadm/ |
operator, run once | WP-07: containerd/kubeadm init+join, flannel, Argo CD install, root-app |
argocd/root-app.yaml |
Argo CD app-of-apps root | WP-07 |
apps/ |
child Argo CD Applications | WP-14 |
workloads/{demo-app,ingress-nginx,chaos-mesh,alloy}/ |
Argo CD | WP-14, WP-15 |
vm/<role>/apply.sh |
GCE startup script and make vm-sync |
WP-08..12 |
vm/<role> matches the role metadata each VM gets from Terraform:
observability, harness, ai-env, postgres-primary, postgres-replica,
legacy-api. The startup script runs vm/<role>/apply.sh when it exists and is
executable; apply.sh must be idempotent because make vm-sync re-runs it.