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

未關閉 適合新手
#1,236 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 2 天內回覆

@shanurwan 已經在處理了。

開始於 2026年11月14日。

  • #1241 來自 @shanurwan —— 未關閉

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
62/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
go, kubernetes, postgresql
領域
backend, cloud

研究方向

從 internal/cnpgi/operator/reconciler.go 開始,查看 pre-reconcile 鉤子附近輸出 'barman object configuration not found, requeuing' 日誌的位置,並閱讀 BEHAVIOR_REQUEUE 的回傳值。修正方法是在找不到 ObjectStore 的情況下回傳非零的 RequeueAfter(幾秒鐘)。當一個早於其 ObjectStore 建立的 Cluster 無需無關變更即可被重新協調時,即為完成。對鉤子回傳值撰寫單元測試是最自然的驗證方式。

由索引模型根據 Issue 內容生成。

描述

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.

主要語言
Go
星號
214
分支
91
平均合併
2 天 11 小時
30 天內合併 PR
38

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

cloudnative-pg/plugin-barman-cloud 的其他 Issue

查看 cloudnative-pg/plugin-barman-cloud 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。