Pod Deletion Event Not Caught by waitForPodDeletion Function

Abierto
#2,919 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
52/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
go, kubernetes, postgresql

Línea de trabajo

Comienza en pkg/cluster/pod.go, en la función recreatePod, y sigue cómo waitForPodDeletion se suscribe a los eventos de eliminación del pod y los gestiona. Reproduce el momento en que la eliminación precede a la configuración del listener y, a continuación, verifica que la eliminación se observe de forma fiable y que la función ya no se quede bloqueada ni agote el tiempo de espera después de que el pod haya desaparecido.

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

Descripción

Environment Information

  • Which image of the operator are you using? master branch
  • Where do you run it - cloud or metal? Kubernetes or OpenShift? Bare Metal K8s
  • Are you running Postgres Operator in production? No (test environment)
  • Type of issue? Bug report

File Path

pkg/cluster/pod.go in the recreatePod function

Description of the Issue

Sometimes, when a pod has already been deleted, the waitForPodDeletion function in the recreatePod method fails to catch the PodDeletion Event. This causes the function to hang or timeout, even though the pod deletion has actually occurred.

Steps to Reproduce

  1. Trigger pod recreation via the recreatePod function
  2. In some cases, the pod gets deleted successfully
  3. However, the waitForPodDeletion function doesn't detect this event
  4. The process gets stuck waiting for an event that won't come

Expected Behavior

The waitForPodDeletion function should reliably detect when a pod has been deleted, regardless of timing or race conditions.

Actual Behavior

The function sometimes misses the deletion event, causing the process to hang.

Additional Information

This issue appears to be related to event handling in the operator. It might be a race condition where the pod deletion event occurs before the event listener is properly set up, or the event is somehow missed by the subscriber mechanism.

Lenguaje dominante
Go
Estrellas
5.3k
Forks
1.1k
Merge medio
3 d 17 h
PR fusionados (30 d)
11

Preparar el entorno

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 zalando/postgres-operator

Todos los issues de zalando/postgres-operator

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.