HDDS-15535. Container Balancer should validate configuration and report startup failures to user#10812
Draft
sreejasahithi wants to merge 2 commits into
Draft
HDDS-15535. Container Balancer should validate configuration and report startup failures to user#10812sreejasahithi wants to merge 2 commits into
sreejasahithi wants to merge 2 commits into
Conversation
…rt startup failures to user
Contributor
Author
|
Open question for reviewers: |
sreejasahithi
force-pushed
the
HDDS-15535
branch
from
July 20, 2026 04:51
a9449c5 to
c205795
Compare
Contributor
Author
|
@ashishkumar50 could you please review this PR. |
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.
What changes were proposed in this pull request?
Currently, Container Balancer could start with configuration that made balancing impossible or misleading, with no clear reporting to the user.
This change adds startup time validation and ensures configuration errors are returned to the client with a useful message.
Problem :
Users could start the balancer with invalid or self-defeating configuration, for example:
This patch adds validation in ContainerBalancer before the balancer task starts. Failures throw InvalidContainerBalancerConfigurationException, so ozone admin containerbalancer start reports the reason to the user.
Note: The datanode check validates that at least two eligible datanodes exist and that the configured percentage allows at least two datanodes to be involved per iteration. It does not validate whether those datanodes can actually form a valid source or target, because that would require reusing much of the balancer iteration logic. Failures of that kind may still appear via ozone admin containerbalancer status (stop reason / message).
What is the link to the Apache JIRA
HDDS-15535
How was this patch tested?
Added tests
Manually tested in docker ozone cluster:
Green CI : https://github.com/sreejasahithi/ozone/actions/runs/29627948987