Skip to content

fix: allow unrecoverable annotation to work on non-ready pods#9968

Merged
mnencia merged 2 commits intomainfrom
dev/9947
Feb 27, 2026
Merged

fix: allow unrecoverable annotation to work on non-ready pods#9968
mnencia merged 2 commits intomainfrom
dev/9947

Conversation

@armru
Copy link
Member

@armru armru commented Feb 12, 2026

Pods annotated with alpha.cnpg.io/unrecoverable=true were not being deleted when the postgres process was not running, because the reconciliation loop returned early waiting for pods to report their status before reaching the unrecoverable instance check.

Move the reconcileUnrecoverableInstances call before the early return so that unrecoverable pods are handled regardless of their readiness state.

Closes #9947

@armru armru requested a review from a team as a code owner February 12, 2026 12:55
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Feb 12, 2026
@cnpg-bot cnpg-bot added backport-requested ◀️ This pull request should be backported to all supported releases release-1.25 release-1.27 release-1.28 labels Feb 12, 2026
@github-actions
Copy link
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

@dosubot dosubot bot added the bug 🐛 Something isn't working label Feb 12, 2026
@armru armru removed bug 🐛 Something isn't working release-1.25 release-1.27 labels Feb 12, 2026
@armru
Copy link
Member Author

armru commented Feb 12, 2026

/test

@github-actions
Copy link
Contributor

@armru, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/21947688529

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 23, 2026
@mnencia
Copy link
Member

mnencia commented Feb 23, 2026

/test

@github-actions
Copy link
Contributor

@mnencia, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/22306578610

@cnpg-bot cnpg-bot added the ok to merge 👌 This PR can be merged label Feb 23, 2026
armru and others added 2 commits February 27, 2026 15:52
Pods annotated with alpha.cnpg.io/unrecoverable=true were not being
deleted when the postgres process was not running, because the
reconciliation loop returned early waiting for pods to report their
status before reaching the unrecoverable instance check.

Move the reconcileUnrecoverableInstances call before the early return
so that unrecoverable pods are handled regardless of their readiness
state.

Fixes: #9947

Signed-off-by: Armando Ruocco <[email protected]>
@mnencia mnencia merged commit 09b91e5 into main Feb 27, 2026
31 of 34 checks passed
@mnencia mnencia deleted the dev/9947 branch February 27, 2026 17:01
cnpg-bot pushed a commit that referenced this pull request Feb 27, 2026
Pods annotated with alpha.cnpg.io/unrecoverable=true were not being
deleted when the postgres process was not running, because the
reconciliation loop returned early waiting for pods to report their
status before reaching the unrecoverable instance check.

Move the reconcileUnrecoverableInstances call before the early return so
that unrecoverable pods are handled regardless of their readiness state.

Closes #9947

Signed-off-by: Armando Ruocco <[email protected]>
Signed-off-by: Marco Nenciarini <[email protected]>
Co-authored-by: Marco Nenciarini <[email protected]>
(cherry picked from commit 09b91e5)
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 lgtm This PR has been approved by a maintainer ok to merge 👌 This PR can be merged release-1.28 size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Non-ready pods are not cleared via alpha.cnpg.io/unrecoverable=true annotation

4 participants