Repository navigation
Conversation
Contributor
|
❗ By default, the pull request is configured to backport to all release branches.
|
Member
Author
|
/test |
Contributor
|
@armru, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/45615689432 |
When the primary is lost and the only instances left have diverged from its timeline, the operator skips the election, as it never promotes a diverged instance. The cluster stays without a primary and nothing told why: the phase reason asked to wait for the instances to become active, and the `ReplicasHealthy` condition describes the replicas, not the missing primary. The operator now sets the `NoPromotableInstance` condition on the Cluster while every active instance is recorded as diverged. Its message names the primary and the diverged instances. The condition is derived from the status of the instances, next to `ReplicasHealthy`, and is removed as soon as an instance that has not diverged is active again. The election is not changed. The phase reason shown while the operator waits for the instances to become active now points to the conditions of the Cluster. The documentation on diverged replicas mentions this case. Closes #12013 Signed-off-by: Armando Ruocco <[email protected]>
gbartolini
force-pushed
the
dev/12013
branch
from
November 25, 2026 20:15
6aa6f28 to
4fb4932
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the primary is lost and the only instances left have diverged from its timeline, the operator skips the election, as it never promotes a diverged instance. The cluster stays without a primary and nothing told why: the phase reason asked to wait for the instances to become active, and the
ReplicasHealthycondition describes the replicas, not the missing primary.The operator now sets the
NoPromotableInstancecondition on the Cluster while every active instance is recorded as diverged. Its message names the primary and the diverged instances. The condition is derived from the status of the instances, next toReplicasHealthy, and is removed as soon as an instance that has not diverged is active again. The election is not changed.The phase reason shown while the operator waits for the instances to become active now points to the conditions of the Cluster.
The documentation on diverged replicas mentions this case.
Closes #12013