Skip to content

docs: describe what the primary isolation check actually does - #11518

Merged
mnencia merged 1 commit into
mainfrom
dev/11280-docs
Sep 21, 2026
Merged

mnencia merged 1 commit into
mainfrom
dev/11280-docs

Conversation

@mnencia

@mnencia mnencia commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

The isolation check only fails the liveness probe. The kubelet then restarts the container through its normal termination path, a smart shutdown that lets already-open sessions keep committing until smartShutdownTimeout elapses (180s default). The docs said the check "stops", "fences", or "shuts down" the primary, none of which is what the code does.

Point out spec.smartShutdownTimeout: 0 as the workaround for anyone who needs the write window closed sooner than the fix landing in CloudNativePG 1.31.

Related to #11280

@mnencia
mnencia requested a review from a team as a code owner September 21, 2026 11:44
@cnpg-bot cnpg-bot added backport-requested ◀️ This pull request should be backported to all supported releases release-1.28 release-1.29 release-1.30 labels Sep 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

❗ By default, the pull request is configured to backport to all release branches.

  • To stop backporting this pr, remove the label: backport-requested ◀️ or add the label 'do not backport'
  • To stop backporting this pr to a certain release branch, remove the specific branch label: release-x.y

@mnencia

mnencia commented Sep 21, 2026

Copy link
Copy Markdown
Member Author

/ok-to-merge doc only

@cnpg-bot cnpg-bot added the ok to merge 👌 This PR can be merged label Sep 21, 2026
The isolation check only fails the liveness probe. The kubelet then
restarts the container through its normal termination path, a smart
shutdown that lets already-open sessions keep committing until
smartShutdownTimeout elapses (180s default). The docs said the check
"stops", "fences", or "shuts down" the primary, none of which is what
the code does.

Point out spec.smartShutdownTimeout: 0 as the workaround for anyone
who needs the write window closed sooner than the fix landing in
CloudNativePG 1.31.

Related to #11280

Signed-off-by: Marco Nenciarini <[email protected]>
@mnencia

mnencia commented Sep 21, 2026

Copy link
Copy Markdown
Member Author

Verified the smartShutdownTimeout: 0 workaround with a live test: local kind cluster, two 2-instance clusters (defaults vs smartShutdownTimeout: 0), one already-open session per primary predating the partition, isolated each primary's node from the API server and its peer only (surgical iptables, not a full node disconnect, so the session itself wasn't the thing broken).

Same partition, same detection timing. smartShutdownTimeout: 0: the open session stopped committing ~6s after the partition (detection only). Default (180s): the same open session kept committing until ~185s after the partition, matching the 180s budget plus detection. Confirms the doc change against actual current behavior, not just against the code.

@mnencia
mnencia merged commit 59799f9 into main Sep 21, 2026
35 checks passed
@mnencia
mnencia deleted the dev/11280-docs branch September 21, 2026 12:25
cnpg-bot pushed a commit to cloudnative-pg/api that referenced this pull request Sep 21, 2026
…ative-pg/cloudnative-pg#11518)

The isolation check only fails the liveness probe. The kubelet then
restarts the container through its normal termination path, a smart
shutdown that lets already-open sessions keep committing until
smartShutdownTimeout elapses (180s default). The docs said the check
"stops", "fences", or "shuts down" the primary, none of which is what
the code does.

Point out `spec.smartShutdownTimeout: 0` as the workaround for anyone
who needs the write window closed sooner than the fix landing in
CloudNativePG 1.31.

Related to cloudnative-pg/cloudnative-pg#11280

Signed-off-by: Marco Nenciarini <[email protected]>

(cherry picked from commit cloudnative-pg/cloudnative-pg@59799f9)
cnpg-bot pushed a commit that referenced this pull request Sep 21, 2026
The isolation check only fails the liveness probe. The kubelet then
restarts the container through its normal termination path, a smart
shutdown that lets already-open sessions keep committing until
smartShutdownTimeout elapses (180s default). The docs said the check
"stops", "fences", or "shuts down" the primary, none of which is what
the code does.

Point out `spec.smartShutdownTimeout: 0` as the workaround for anyone
who needs the write window closed sooner than the fix landing in
CloudNativePG 1.31.

Related to #11280

Signed-off-by: Marco Nenciarini <[email protected]>
(cherry picked from commit 59799f9)
mnencia added a commit that referenced this pull request Sep 21, 2026
The isolation check only fails the liveness probe. The kubelet then
restarts the container through its normal termination path, a smart
shutdown that lets already-open sessions keep committing until
smartShutdownTimeout elapses (180s default). The docs said the check
"stops", "fences", "shuts down", or "enforces the shutdown" of an
isolated primary within 30 seconds, none of which is what the code
does. The 1.27 upgrade note repeated the same overclaim; fixed there
too.

Point out `spec.smartShutdownTimeout: 0` as the workaround for anyone
who needs the write window closed sooner than the fix landing in
CloudNativePG 1.31.

Related to #11280

Signed-off-by: Marco Nenciarini <[email protected]>
(cherry picked from commit 59799f9)
mnencia added a commit that referenced this pull request Sep 21, 2026
The isolation check only fails the liveness probe. The kubelet then
restarts the container through its normal termination path, a smart
shutdown that lets already-open sessions keep committing until
smartShutdownTimeout elapses (180s default). The docs said the check
"stops", "fences", "shuts down", or "enforces the shutdown" of an
isolated primary within 30 seconds, none of which is what the code
does. The 1.27 upgrade note repeated the same overclaim; fixed there
too.

Point out `spec.smartShutdownTimeout: 0` as the workaround for anyone
who needs the write window closed sooner than the fix landing in
CloudNativePG 1.31.

Related to #11280

Signed-off-by: Marco Nenciarini <[email protected]>
(cherry picked from commit 59799f9)
@gbartolini gbartolini linked an issue Oct 22, 2026 that may be closed by this pull request
@gbartolini

Copy link
Copy Markdown
Contributor

Related to #11721

@gbartolini gbartolini linked an issue Oct 23, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-requested ◀️ This pull request should be backported to all supported releases no-issue ok to merge 👌 This PR can be merged release-1.28 release-1.30

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Primary lease: hardening failover and switchover in 1.31

4 participants