ZooKeeper znode controller: release finalizer without connecting when the parent is deleting
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- kubernetes, rust
- Ambito
- devops, distributed-systems
Direzione di ricerca
Inizia dal ramo finalizer::Event::Cleanup e segui come gestisce uno ZookeeperCluster referenziato con un deletionTimestamp. Controlla il percorso di pulizia ensure_znode_missing e i test di integrazione che mostrano namespace bloccati in Terminating. Il lavoro è completato quando l’eliminazione salta la connessione a ZooKeeper e rilascia il finalizer senza il backoff di diversi minuti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Rust
- Stelle
- 37
- Fork
- 11
- Merge medio
- 1g 8h
- PR unite (30g)
- 10
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di stackabletech/zookeeper-operator
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
stackabletech/zookeeper-operator#959 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
-
type/bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
-
type/bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
Tutte le issue di stackabletech/zookeeper-operator
Issue simili
-
risk:low runtime status:in-progress type:test
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
zeroclaw-labs/zeroclaw#11023 ·
-
good first issue refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
bevyengine/bevy#25861 ·