ZooKeeper znode controller: release finalizer without connecting when the parent is deleting
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- kubernetes, rust
調査の方向性
finalizer::Event::Cleanup アームから開始し、deletionTimestamp を持つ参照先の ZookeeperCluster をどのように処理するかを追跡します。ensure_znode_missing のクリーンアップパスと、Terminating で停止した namespace を明らかにする統合テストを確認します。削除時に ZooKeeper 接続をスキップし、数分間のバックオフなしで finalizer を解放できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Problem
In some scenarios, the ZookeeperZnode finalizer (zookeeper.stackable.tech/znode) can take around 130–150s to release. That's what sometimes leaves namespaces stuck in Terminating in our integration tests.
This can happen when the operator tries connection to Zookeeper to delete the node, while ZooKeeper is being torn down, the delete/cleanup path (ensure_znode_missing) runs its errors through controller-runtime's exponential backoff, and that's where the multi-minute stall comes from.
Mechanism
- znode cleanup (
ensure_znode_missing) tries to connect to the ZK service and gets Connection refused — the ZK pods/endpoints are already gone — so the reconcile errors out. - The
ZookeeperClusterCR then drops out of the watch cache. At this point the finalizer's fast path (cluster doesn't exist → assume the znode is gone → drop the finalizer without connecting) would kick in, but the failed reconcile is already sitting in exponential backoff. - ~139s gap: nothing re-runs, even though the fast-path condition is now true.
- Backoff finally expires, the reconcile re-runs, the fast path fires, the finalizer is removed, and the namespace deletes.
So it comes down to queue ordering under load. If cleanup runs after the CR leaves the store, it's instant if it runs before, it errors, hits backoff, and takes 130s+.
Fix
In the finalizer::Event::Cleanup arm: if the referenced ZookeeperCluster has a deletionTimestamp, drop the finalizer straight away without connecting to ZK. Retrying an unreachable server makes sense on the create path; on the delete path it shouldn't be allowed to block teardown.
- 主要言語
- Rust
- スター
- 37
- フォーク
- 11
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 10
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
stackabletech/zookeeper-operator のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
stackabletech/zookeeper-operator#959 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
type/bug
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
-
type/bug
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
stackabletech/zookeeper-operator の issue をすべて見る
似ている issue
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
yantrikos/yantrik-os#255 ·
-
bug CLI custom-model
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
raphamorim/rio#1956 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
rust-bitcoin/rust-bitcoin#6930 · コメント 1 件 ·