Topology Provider permissions briefly dropped during reconciliation when the reflector watch resets

Abierto
#774 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
42/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Tranquilo
Stack tecnológico
kubernetes, rust

Línea de trabajo

Comienza siguiendo la ruta de reconciliación del operador HDFS y el manejo de eventos del watcher kube-rs Reflector, especialmente las reconstrucciones de Store y las actualizaciones de RoleBinding. Comprueba cómo afectan actualmente Init, InitApply, InitDone, Apply, Delete y los eventos de error a la reconciliación. Se considera terminado cuando las reconciliaciones no pueden actuar sobre un Store vacío o parcialmente poblado, se conservan los permisos de la cuenta de servicio y el trabajo se vuelve a poner en cola eventualmente.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

type/bug
Affected Stackable version

Any up to and including SDP 26.3.0

Affected Apache HDFS version

N/A

Current and expected behavior

In the HDFS operator (and perhaps any operator based on kube-rs), when the Reflector watch resets, the Store has to be rebuilt.
Reconciliations before the Store is fully consistent can lead to service accounts being dropped from (Cluster)RoleBindings. The leads to the Topoology Provider not being able to determine the topology (or possibly builds an incorrect topology?)

The expected behaviour is that the above doesn't happen 😅.

Possible solution

We can requeue reconciliations (at least for some operations) until the store is fully consistent.

Eg:

  • On error: log error and return early
  • watcher::Event::Init -> the store is empty, waiting for InitApply events, requeue/return early.
  • watcher::Event::InitApply -> store is partially populated, requeue/return early until InitDone.
  • watcher::Event::InitDone -> store is populated, continue with reconcile
  • watcher::Event::Apply -> store is populated, continue with reconcile
  • watcher::Event::Delete -> store is populated, continue with reconcile

[!CAUTION]
I haven't checked to see whether we can and should requeue, or just return an error which bubbles up as a Result for the error_policy handler which logs and does requeues.
Regardless, we need to make sure it eventually is reconciled and not just ignored.

Additional context

My understanding of the problem/solution should be double checked with someone else.

[!TIP]
This might only be when the topology provider is used... but also seems like something that might affect other products that have components that interact with Kubernetes API in SDP generally

Environment

No response

Would you like to work on fixing this bug?

yes

Lenguaje dominante
Rust
Estrellas
53
Forks
9
Merge medio
1 d 13 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

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de stackabletech/hdfs-operator

Todos los issues de stackabletech/hdfs-operator

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.