From e2705ba0fb5a3980bfeb63d910debbefd03f6876 Mon Sep 17 00:00:00 2001 From: atlas-bot Date: Mon, 28 Sep 2026 17:02:38 +0000 Subject: [PATCH] fix(ha-restore-test): load barman-cloud plugin (no WAL archiver) so the restored instance starts (REN-339) The instance manager refuses to start PostgreSQL when the Cluster references a plugin (externalClusters) that has no sidecar in the pod. Add a plugins entry with isWALArchiver: false and a distinct serverName. Co-Authored-By: Claude Opus 5.5 --- kubernetes/apps/ha-restore-test/cluster.yaml | 15 +++++++++++++-- kubernetes/apps/ha-restore-test/objectstore.yaml | 7 ++++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/kubernetes/apps/ha-restore-test/cluster.yaml b/kubernetes/apps/ha-restore-test/cluster.yaml index 41ee4268..455ae8ec 100644 --- a/kubernetes/apps/ha-restore-test/cluster.yaml +++ b/kubernetes/apps/ha-restore-test/cluster.yaml @@ -1,8 +1,13 @@ # Runbook C.1: recover the recorder DB from ha-pg's Barman backups to the # latest point (last base backup + archived WAL). # -# DELIBERATELY NO `plugins:` block. With no WAL archiver this cluster never -# writes to s3://renner-uno-k8s-cnpg/ha-pg; see objectstore.yaml. +# The `plugins:` entry exists only so CNPG injects the barman-cloud sidecar +# into the instance pod: the instance manager must load every plugin the +# Cluster references (here via externalClusters) and without the sidecar it +# never starts PostgreSQL ("Unknown plugin"). isWALArchiver: false, so this +# cluster never archives WAL; no Backup/ScheduledBackup exists here, so it +# never writes a base backup. serverName differs from ha-pg as a second +# guard; see objectstore.yaml. # # One instance, no walStorage, ceph-block-ephemeral (reclaim Delete) so # nothing outlives the namespace. 32Gi matches ha-pg's PGDATA: the restored @@ -19,6 +24,12 @@ spec: storage: storageClass: ceph-block-ephemeral size: 32Gi + plugins: + - name: barman-cloud.cloudnative-pg.io + isWALArchiver: false + parameters: + barmanObjectName: ha-pg-store-ro + serverName: ha-pg-restore-test bootstrap: recovery: source: ha-pg diff --git a/kubernetes/apps/ha-restore-test/objectstore.yaml b/kubernetes/apps/ha-restore-test/objectstore.yaml index 16926b1c..c599f494 100644 --- a/kubernetes/apps/ha-restore-test/objectstore.yaml +++ b/kubernetes/apps/ha-restore-test/objectstore.yaml @@ -2,9 +2,10 @@ # # Two clusters archiving WAL to one destinationPath corrupt both (see # ../home-assistant/ha-pg-objectstore.yaml). That cannot happen here: the -# recovered Cluster in cluster.yaml has NO `plugins` entry, so nothing archives -# WAL or takes base backups through this store. No retentionPolicy either, so -# nothing here can prune ha-pg's backups. +# recovered Cluster in cluster.yaml loads the plugin with isWALArchiver: false +# and has no Backup/ScheduledBackup, so nothing archives WAL or takes base +# backups through this store. No retentionPolicy either, so nothing here can +# prune ha-pg's backups. apiVersion: barmancloud.cnpg.io/v1 kind: ObjectStore metadata: -- 2.54.0