Cluster never reconciles when created before its ObjectStore: requeue without RequeueAfter is dropped

Offen Anfängerfreundlich
#1,236 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 2 Tagen

@shanurwan arbeitet bereits daran.

Seit 14.11.2026.

  • #1241 von @shanurwan — offen

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
62/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
go, kubernetes, postgresql
Bereich
backend, cloud

Rechercherichtung

Beginne in internal/cnpgi/operator/reconciler.go, etwa beim Pre-Reconcile-Hook, an dem die Log-Ausgabe 'barman object configuration not found, requeuing' erzeugt wird, und sieh dir die Rückgabe BEHAVIOR_REQUEUE an. Die Lösung besteht darin, für den Fall, dass das ObjectStore nicht gefunden wird, ein RequeueAfter ungleich null (einige Sekunden) zurückzugeben. Fertig ist es, wenn ein Cluster, der vor seinem ObjectStore angelegt wurde, ohne eine unabhängige Änderung reconciled wird; ein Unit-Test für den Rückgabewert des Hooks ist die naheliegende Prüfung.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

When a Cluster referencing an ObjectStore is created just before it (e.g. Helm installs Cluster before ObjectStore, unknown kinds being sorted alphabetically), the Cluster stays without instances until it is changed again.

The pre-reconcile hook logs barman object configuration not found, requeuing and returns BEHAVIOR_REQUEUE with no RequeueAfter (reconciler.go, unchanged on main). CNPG maps it to StopReconciliation: true and ctrl.Result{RequeueAfter: 0} (reconciler.go), which controller-runtime does not requeue. The operator logs Pre-reconcile hook stopped the reconciliation loop with "Requeue":false,"RequeueAfter":0, and nothing follows.

Versions: plugin-barman-cloud v0.15.1 (same code in v0.16.0), CloudNativePG 1.30.1.

Workaround: any change to the Cluster, e.g. an annotation.

Suggested fix: set a RequeueAfter (a few seconds) when the ObjectStore is not found.

Vorherrschende Sprache
Go
Sterne
214
Forks
91
Ø Merge
2 T. 11 Std.
Gemergte PRs (30 T.)
38

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus cloudnative-pg/plugin-barman-cloud

Alle Issues in cloudnative-pg/plugin-barman-cloud

Ähnliche Issues

Weitere Issues zu Go

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.