ZooKeeper znode controller: release finalizer without connecting when the parent is deleting
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 68/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- kubernetes, rust
- Área
- devops, distributed-systems
Línea de trabajo
Comienza en la rama finalizer::Event::Cleanup y sigue cómo gestiona un ZookeeperCluster referenciado con un deletionTimestamp. Revisa la ruta de limpieza ensure_znode_missing y las pruebas de integración que muestran namespaces atascados en Terminating. Se considera completado cuando la eliminación omite la conexión de ZooKeeper y libera el finalizer sin el backoff de varios minutos.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Rust
- Estrellas
- 37
- Forks
- 11
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 10
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de stackabletech/zookeeper-operator
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
stackabletech/zookeeper-operator#959 · 1 comentario ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
-
type/bug
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
-
type/bug
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
Todos los issues de stackabletech/zookeeper-operator
Issues similares
-
risk:low runtime status:in-progress type:test
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
zeroclaw-labs/zeroclaw#11023 ·
-
good first issue refactor
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
EricSpencer00/Resilient#4835 · 1 comentario ·
-
agent:ready documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
cesarferreira/stax#890 ·
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100