Repository navigation
Conversation
|
❗ By default, the pull request is configured to backport to all release branches.
|
|
/test |
|
@mnencia, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/40557525886 |
35f4c9e to
6fc0e57
Compare
With isolationCheck.enabled set to false the lease monitor never stopped the primary, so it kept accepting writes after a replica took over. Promotion after the lease expires is only safe because an isolated primary stops first, so the check now runs whatever the setting says, and the admission webhook warns that the field is ignored. Closes #11777 Signed-off-by: Marco Nenciarini <[email protected]>
The warning said that the alpha.cnpg.io/livenessPinger annotation is ignored and should be removed. Its timeouts are still honored, and the annotation is copied into the spec only while the isolation check stanza is missing: once it has set enabled to false, removing it leaves the field as it is and the warning keeps coming back. The warning now names the field and says how to clear it. Signed-off-by: Armando Ruocco <[email protected]>
The timeouts are integers, and the admission webhook rejects the quoted values the example used. Signed-off-by: Armando Ruocco <[email protected]>
|
I propose to close this in favour of #11795. Making the check always active ignores #11795 keeps that meaning and fixes what was actually wrong: a disabled check never looked at its peers, so a primary kept running even when a reachable peer reported that another instance had been named the target primary. With #11795 only that case stops a disabled primary, unreachable peers still do not. I checked it on kind: without the change the primary kept accepting writes for 110 seconds, with it the primary stopped two seconds after the target changed. The cost is that a disabled check still leaves a fully isolated primary running after its lease expires, which is what disabling it means. The docs in #11795 say so. If you see a reason to make the check mandatory anyway, say so here. Otherwise I will close this one. |
With
isolationCheck.enabledset tofalsethe lease monitor never stopped the primary, so it kept accepting writes after a replica took over. Promotion after the lease expires is only safe because an isolated primary stops first, so the check now runs whatever the setting says, and the admission webhook warns that the field is ignored. A cluster that set it tofalsenow gets its primary stopped when a peer is unreachable or names another target.Closes #11777
Not for the squash message. Checked on kind with the operator built from this branch: with
enabled: false, the isolated primary's container was stopped before the new primary was promoted. On main, both primaries accepted writes for more than 120 seconds (see #11777). The e2e specprimary_self_isolation_test.gonow expects the disabled fixture to terminate the primary too; I vetted and linted it but did not run it. #11367 can drop the isolation check condition from its WAL receiver wait once this lands. Clusters that disabled the check as a workaround for #11641 get its restarts back: one unreachable peer and a lease renewal outage longer thanrenewDeadlineSecondsstop the primary. They can tuneprimaryLeaseandrequestTimeoutinstead.