Deprecate Leader for life based leader election
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- go
- Área
- distributed-systems
Línea de trabajo
Comienza localizando la implementación de leader-for-life y cómo se integra con manager y controller-runtime. Revisa los issues vinculados de operator-lib y controller-runtime antes de decidir el camino de deprecación. Se considera terminado cuando la opción leader-for-life está deprecada y se ha programado su eliminación en futuras versiones de Operator SDK, y se ha abordado la cuestión de la integración upstream.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Feature Request
Is your feature request related to a problem? Please describe.
Currently, the repository contains a leader-for-life based election model that ensures that a single leader is elected for life during a HA state.
To briefly describe what leader for life and leader for lease approaches are:
(1) Leader for life: A leader pod is selected for life until its garbage collected. This ensures there is only one leader at any instant of time.
(2) Leader for lease: Leader election happens periodically at a defined interval which can be tweaked. When the current leader is not able to renew the lease, a new leader is elected.
More details on both of these approaches are available here.
Approach (2) is implemented upstream, in client-go and is scaffolded by default for the past 30+ releases of SDK, since it is implemented as a part of setting up the manager in controller-runtime. It guarantees faster election of leaders, less downtime, recovery from disconnected/frozen node failures. However, it does not eliminate the split brain scenario - where more than a single leader is available at an instant of time.
Approach (1) on the other hand, was developed long before we had a leader-for-lease implemented upstream. Though it solves the split brain scenario, it does not guarantee recovery from node failure nor faster recovery. We also have issues with integrating it to controller-runtime (https://github.com/operator-framework/operator-lib/issues/48). Neither is it being maintained nor used as widely as leader for lease.
Here is a detailed comment explaining the preference of (2) over the other, wherein users would prefer a faster recovery even though there is split brain scenario intermittently, rather than an implementation that does not guarantee faster recovery.
Describe the solution you'd like
Since leader for life approach is not being widely used, neither works with controller-runtime seamlessly, it is better to adopt a well tested upstream library than to depend on what is currently available as an option.
The solution for this is:
- To deprecate and remove leader for life in future releases of Operator SDK.
- To bring this up upstream (in controller-runtime), for easier integration. This had already been brought up upstream (https://github.com/kubernetes-sigs/controller-runtime/issues/1963) but there was no response on the same.
- Lenguaje dominante
- Go
- Estrellas
- 40
- Forks
- 42
- Merge medio
- 4 d 46 min
- PR fusionados (30 d)
- 7
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
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 operator-framework/operator-lib
-
Prune package?Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
-
lifecycle/frozen
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
operator-framework/operator-lib#103 · 6 comentarios ·
-
lifecycle/frozen
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
operator-framework/operator-lib#48 · 4 comentarios ·
Todos los issues de operator-framework/operator-lib
Issues similares
-
Service process inherits the caller's cwd at first use, holding that folder open on Windows (EBUSY)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
[docs] Media elements cannot load from a custom protocol (video/audio report MEDIA_ERR_SRC_NOT_SUPPORTED)Posiblemente ocupada @vst93 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
evilmartians/lefthook#1588 ·
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
gravitational/teleport#69847 ·
Los mantenedores suelen responder en 11 días