Skip to content

fix(pool): guard decommission lifecycle recovery#176

Draft
GatewayJ wants to merge 2 commits into
rustfs:mainfrom
GatewayJ:fix/pool-decommission-lifecycle
Draft

fix(pool): guard decommission lifecycle recovery#176
GatewayJ wants to merge 2 commits into
rustfs:mainfrom
GatewayJ:fix/pool-decommission-lifecycle

Conversation

@GatewayJ

@GatewayJ GatewayJ commented Jul 11, 2026

Copy link
Copy Markdown
Member

Type of Change

  • New Feature
  • Bug Fix
  • Documentation
  • Performance Improvement
  • Test/CI
  • Refactor
  • Other:

Related Issues

Fixes rustfs/backlog#1078
Fixes rustfs/backlog#1079
Related to rustfs/backlog#1070

Summary of Changes

  • Count only live pools when evaluating pool decommission start requests, so pools already decommissioning or decommissioned cannot keep the last remaining live pool eligible for decommission.
  • Reject a batch of live-pool Start requests before issuing RustFS admin calls when that batch would decommission every live pool in the Tenant.
  • Restore normal workload reconciliation after a canceled or failed decommission request is removed, instead of leaving the pool permanently lifecycle-gated.
  • Add focused regression tests for last-live-pool protection, batch start protection, and terminal lifecycle recovery.

Checklist

  • I have read and followed the CONTRIBUTING.md guidelines
  • Passed make pre-commit (fmt-check + clippy + test + console-lint + console-fmt-check)
  • Added/updated necessary tests
  • Documentation updated (if needed)
  • CHANGELOG.md updated under [Unreleased] (if user-visible change)
  • CI/CD passed (if applicable)

Impact

  • Breaking change (CRD/API compatibility)
  • Requires doc/config/deployment update
  • Other impact: Preserves normal StatefulSet reconciliation after canceled or failed decommission requests are cleared; prevents decommissioning all live pools, including multi-request batches.

Verification

make pre-commit

Additional Notes

This change only adjusts operator lifecycle gating. It does not change RustFS admin API calls, CRD schema, StatefulSet deletion behavior, or PVC retention behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant