You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 96e445c
Browse filesBrowse the repository at this point in the historyBrowse files
authored
fix: avoid spurious failovers when the primary status endpoint fails transiently (#10445)
When the operator calls /pg/status on the primary during a
reconciliation loop and the request fails, a failover could be triggered
even if the primary pod was still Ready from the kubelet's perspective.
Since a successful /pg/status implies a passing readiness probe but not
vice versa, a failing /pg/status on an otherwise Ready pod is a strong
signal of a transient condition (e.g. a network hiccup between the
operator and the pod) rather than a genuine PostgreSQL health problem.
The reconciliation loop now requeues instead of proceeding when the
current primary equals the target primary, the pod is Ready, but
/pg/status is failing, applying the same conservative approach already
used when the kubelet has not yet refreshed a positive readiness probe.
A follow-up PR (#10509) will surface the deferred failover as a cluster
phase so the state is visible via `kubectl get cluster`.
See #10403
Signed-off-by: Leonardo Cecchi <[email protected]>
Signed-off-by: Armando Ruocco <[email protected]>
Signed-off-by: Marco Nenciarini <[email protected]>
Co-authored-by: Armando Ruocco <[email protected]>
Co-authored-by: Marco Nenciarini <[email protected]>
0 commit comments