Skip to content

[Bug]: failoverQuorum requires more than 2 instances #8679

@ardentperf

Description

@ardentperf

Is there an existing issue already for this bug?

  • 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.

Contact Details

schneider@ardentperf.com

Version

1.27 (latest patch)

What version of Kubernetes are you using?

1.31

What is your Kubernetes environment?

Self-managed: kind (evaluation)

How did you install the operator?

YAML manifest

What happened?

The Cluster "pg-eu" is invalid: spec.instances: Invalid value: 2: failoverQuorum requires more than 2 instances.

just now got this error, while trying to test if quorum failover prevents data loss with preferred dataDurability and 2 instances. we probably don't want that check. if we have ANY 1 then we need both replicas available to safely failover (N=2 means three instances). if we have ANY 2 (or first 2) then we can failover with a single replica.

this design should work great even with two instances. if the second instance isn't yet added back in then we want to block failover. once the second instance is in synchronous_standby_names then we can failover

Cluster resource

apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
  name: pg-eu
  annotations:
    alpha.cnpg.io/failoverQuorum: "true"
spec:
  instances: 2
  imageName: ghcr.io/cloudnative-pg/postgresql:17-bookworm
...

Relevant log output

The Cluster "pg-eu" is invalid: spec.instances: Invalid value: 2: failoverQuorum requires more than 2 instances.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

triagePending triage

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions