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]: Healthy primary removed from -rw when its node loses API-server connectivity, no failover (136 s write outage) #11656
When the node running the primary loses its connection to the API server but the pod network stays up (in our test the kubelet's connection to the API server was cut; pods on that node could still reach the API server and their peers through the overlay), the node goes NotReady. Kubernetes then marks the primary pod not ready, and it is removed from cluster-example-rw. The primary itself stays healthy and keeps accepting local writes, and the operator does not fail over (phase stays Cluster in healthy state), because the instance manager is still reachable.
Result: 136 s of write outage through -rw with a healthy primary and no failover, until the node became Ready again.
For comparison, a Patroni-based operator on the same nodes (Percona Operator for PostgreSQL 3.1.0, whose primary Service endpoints are written by Patroni rather than selected by readiness) had no write interruption in the same test.
Reproduction: on the primary's worker, drop host traffic to the API server's IP (iptables -I OUTPUT -d <apiserver-ip> -j DROP, plus INPUT) for ~3 minutes, while flannel's VXLAN keeps using another interface or IP. Run a write probe against cluster-example-rw.
Expected: either fail over (the primary is effectively unreachable to clients), or keep the -rw endpoint while the instance manager reports a healthy primary, or at least document this failure mode in failure_modes/failover.
Cluster resource
# docs/src/samples/cluster-example.yaml (1.30), plus a barman-cloud plugin entry
Relevant log output
+53s node=NotReady currentPrimary=cluster-example-3 phase="Cluster in healthy state"
... (unchanged until the partition is removed at +180 s)
probe: +45.6s .. +181.4s write failures "Is the server running on that host and accepting TCP/IP connections?"local socket on the primary during the same window: INSERT 0 1 (keeps succeeding)
Follow-up from a related test on the same 1.30.1 lab, which is a stricter variant of this report:
Host of the primary's node: the kubelet/agent loses the API server (OUTPUT to the control plane on 6443 dropped). The node goes NotReady after about 45 s.
Primary pod (in its netns): the API server (10.43.0.0/16) is unreachable, and 5432 to and from both replicas is dropped. Port 8000 between pods is left open.
Result over a 300 s fault:
No failover. currentPrimary and targetPrimary stayed unchanged, and the phase stayed Cluster in healthy state throughout.
The primary logged Primary lease lost, cannot verify holder, retrying and was never restarted.
Sessions opened before the fault kept committing normally: 13,305 acknowledged writes, none lost.
New connections through -rw failed from +44.9 s until the fault was removed, 264 s in total.
So there was no split-brain, but the cluster spent the whole fault with a primary that is healthy yet unreachable for new clients, and no failover happened. That matches the 136 s outage in the original report. For comparison, Patroni (Percona Operator 3.1.0) under the same fault demoted the old primary at +10.5 s and promoted a new one at +21.8 s.
Activity
PeterZaitsev commentedon Oct 14, 2026
Follow-up from a related test on the same 1.30.1 lab, which is a stricter variant of this report:
Result over a 300 s fault:
currentPrimaryandtargetPrimarystayed unchanged, and the phase stayedCluster in healthy statethroughout.Primary lease lost, cannot verify holder, retryingand was never restarted.-rwfailed from +44.9 s until the fault was removed, 264 s in total.So there was no split-brain, but the cluster spent the whole fault with a primary that is healthy yet unreachable for new clients, and no failover happened. That matches the 136 s outage in the original report. For comparison, Patroni (Percona Operator 3.1.0) under the same fault demoted the old primary at +10.5 s and promoted a new one at +21.8 s.