Skip to content

operator: settle each scale-down step before decommissioning the next - #1998

Merged
andrewstucki merged 1 commit into
mainfrom
k8s-955-scale-down-barrier
Oct 27, 2026
Merged

andrewstucki merged 1 commit into
mainfrom
k8s-955-scale-down-barrier

Conversation

@andrewstucki

Copy link
Copy Markdown
Contributor

Lowering statefulset.replicas by more than one broker deleted several broker Pods at once, and only the first was decommissioned. Since 1743490, reconcilePools no longer aborts the chain while CheckScale is false, so reconcileDecommission ran mid-scale. The previous step's terminating Pod was still LastPod, and its decommissioned broker looked already removed, so each pass patched away another broker without decommissioning it. Partitions with a majority on those brokers lost quorum.

Fixes K8S-955.

Lowering statefulset.replicas by more than one broker deleted several
broker Pods at once, and only the first was decommissioned. Since
1743490, reconcilePools no longer aborts the chain while CheckScale is
false, so reconcileDecommission ran mid-scale. The previous step's
terminating Pod was still LastPod, and its decommissioned broker looked
already removed, so each pass patched away another broker without
decommissioning it. Partitions with a majority on those brokers lost
quorum.

Fixes K8S-955.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused guards prevent overlapping scale-down steps, and no unresolved blocking issues remain.

No open issues 🎉

What changed in this PR

Prevents multi-broker scale-downs from deleting brokers before they are decommissioned, avoiding partition quorum loss.

Changes:

  • Gate scale-down steps on settled pool scaling in both controllers.
  • Require current-generation Stable and Healthy conditions in the scaling test.
  • Remove an outdated comment and document the fix.
File Description
operator/​internal/​controller/​redpanda/​redpanda_controller.go Gate successive Redpanda scale-down steps.
operator/​internal/​controller/​redpanda/​redpanda_controller_test.go Strengthen scaling success checks.
operator/​internal/​controller/​redpanda/​multicluster_controller.go Apply the same gate to StretchCluster and remove an outdated comment.
.changes/​unreleased/​operator-Fixed-20261021-170000.yaml Document the scale-down fix.

Review effort: Balanced

@secpanda

secpanda commented Oct 21, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open 5 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions Bot added the stale label Oct 27, 2026
@github-actions

Copy link
Copy Markdown

💚 All backports created successfully

Status Branch Result
✅ release/v25.3.x
✅ release/v26.1.x
✅ release/v26.2.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

andrewstucki added a commit that referenced this pull request Oct 27, 2026
…#1998) (#2024)

Lowering statefulset.replicas by more than one broker deleted several
broker Pods at once, and only the first was decommissioned. Since
1743490, reconcilePools no longer aborts the chain while CheckScale is
false, so reconcileDecommission ran mid-scale. The previous step's
terminating Pod was still LastPod, and its decommissioned broker looked
already removed, so each pass patched away another broker without
decommissioning it. Partitions with a majority on those brokers lost
quorum.

Fixes K8S-955.

(cherry picked from commit fde0a00)

Co-authored-by: Andrew Stucki <andrew.stucki@redpanda.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants