Repository navigation
fix: allow restarting stopped pool rebalances - #273
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Description
A retained rebalance task with pool states
Stopped / None / Nonewas summarized as an empty state, then treated asstartingbecause its historical task ID still existed. This displayed an enabled Stop button and hid Start; clicking Stop producedpool rebalance is not started.Recognize stopped pool states when deriving the overall state, restoring Stopped and Start Rebalance while preserving historical progress. Keep running, stopping, and failure precedence unchanged, and retain the starting state for a new start response containing only an ID.
Type of Change
Testing
Added 11 regression cases covering historical stopped runs with and without
stoppedAt, stopped/unused/completed mixtures, active-state precedence, stop aliases, retained progress, and new task IDs. The focused suite passed all 25 tests; seven stopped-state cases failed against the original implementation. The full suite passed all 787 tests.Browser interaction checks used the actual local Next.js page with mocked API responses, without connecting to a storage cluster. Clicking Start issued exactly one
POST /rustfs/admin/v3/rebalance/startand no stop request; the subsequent status response containing a new ID and aStartedpool, without a top-level status, displayed Running. Running/stopping/error/loading states prevented another start, while idle allowed it. Desktop/mobile, Chinese, and dark mode were visually checked. No page exceptions occurred; the existing avatar sizing warning and the intentionally injected HTTP 500 were observed.Checklist
Related Issues
Closes rustfs/rustfs#8689
Screenshots (if applicable)
Actual Console rendering with illustrative mocked API data; these screenshots are UI regression evidence, not live-cluster acceptance. Each before/after pair uses the same stopped-task response and viewport. Image assets are stored on a separate evidence branch and are not included in this PR's source diff.
Additional Notes
Independent correctness/simplification review and browser/UX validation found no issues. The change is confined to Console state derivation; no server API or storage behavior changes. Reverting this commit restores the prior UI behavior.