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
[Bug]: with the primary isolation check disabled, a primary ignores a peer that names another target primary #11777
I have searched for an existing issue, and could not find anything. I believe this is a new bug.
I have read the troubleshooting guide
I have read the troubleshooting guide and I think this is a new bug.
I am running a supported version of CloudNativePG
I have read the troubleshooting guide and I think this is a new bug.
Version
trunk (main)
What version of Kubernetes are you using?
Not specific to a Kubernetes version
What is your Kubernetes environment?
Other
How did you install the operator?
Other
What happened?
With isolationCheck.enabled: false, shouldStepDown returns false before it probes any peer. A primary that cannot reach the API server therefore never learns, from the peers' /failsafe answers, that another instance was named the target primary, and keeps running even when a reachable peer reports it. monitorLeaseAge logs "Not stepping down: the other instances are reachable and agree this is the primary" on every tick, although no peer was probed.
Disabling the check should only mean that an isolated primary is not stopped. A peer that names another target primary is not a sign of isolation, it is proof that the primary was replaced, so it should stop it whatever the setting says. The check moved to the lease in #11357. On 1.30 it is still in the liveness probe, so this is about main.
Seen on kind with main (c9b06b3): 3 instances, enabled: false, the primary's route to the API server dropped with iptables (the peers stay reachable), and status.targetPrimary patched to a replica. The primary kept running for 110 seconds, answering pg_is_in_recovery() = false and accepting an INSERT, and logged "Not stepping down" 67 times. With enabled: true it stopped one second after the patch.
{"level":"info","ts":"2026-10-27T17:30:23.626936095Z","logger":"primary-lease.primary-lease","msg":"Not stepping down: the other instances are reachable and agree this is the primary, retrying","logger":"instance-manager","logging_pod":"iso-disabled-1","leaseAge":121.798480859}
changed the title [-][Bug]: disabling the primary isolation check leaves an isolated primary running after its lease expires[/-][+][Bug]: with the primary isolation check disabled, a primary ignores a peer that names another target primary[/+]on Oct 29, 2026
Activity
feat(instance-manager): make the primary isolation check always active
[-][Bug]: disabling the primary isolation check leaves an isolated primary running after its lease expires[/-][+][Bug]: with the primary isolation check disabled, a primary ignores a peer that names another target primary[/+]fix(instance-manager): stop a superseded primary when the isolation c…
fix(instance-manager): stop a superseded primary when the isolation c…
fix(instance-manager): stop a superseded primary when the isolation c…