Pod Deletion Event Not Caught by waitForPodDeletion Function

Aperta
#2,919 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
go, kubernetes, postgresql

Direzione di ricerca

Inizia in pkg/cluster/pod.go, nella funzione recreatePod, e segui il modo in cui waitForPodDeletion si iscrive agli eventi di eliminazione del pod e li gestisce. Riproduci la tempistica in cui l’eliminazione precede la configurazione del listener, quindi verifica che l’eliminazione venga rilevata in modo affidabile e che la funzione non rimanga più bloccata né vada in timeout dopo che il pod è stato eliminato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Go
Stelle
5.3k
Fork
1.1k
Merge medio
3g 17h
PR unite (30g)
11

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di zalando/postgres-operator

Tutte le issue di zalando/postgres-operator

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.