HDDS-14619. Add option in Container Balancer CLI for excluding containers#9785
HDDS-14619. Add option in Container Balancer CLI for excluding containers#9785sravani-revuri wants to merge 4 commits intoapache:masterfrom
Conversation
sreejasahithi
left a comment
There was a problem hiding this comment.
Thanks @sravani-revuri for working on this.
.../integration-test/src/test/java/org/apache/hadoop/ozone/TestContainerBalancerOperations.java
Show resolved
Hide resolved
There was a problem hiding this comment.
The change largely looks good. However I'm not sure the robot test is explicitly testing whether containers were actually excluded. It's just testing whether it started and was able to balance, right?
What I think you can do is add another robot test case/function in the existing robot test that starts balancer with all containers excluded (before the current code where balancer is started normally). It should start successfully but stop without moving any containers/moving any data. Then the existing test case can run that starts balancer without excluding containers, and then it will move some data and balance the cluster.
Additionally you can add some code to testIfCBCLIOverridesConfigs() to test that excluded containers passed in from the CLI override the default, which is empty.
|
I'm happy with the manual test as well - you can try excluding all containers to prove that no containers are picked. This + some changes to |
What changes were proposed in this pull request?
We already have a configuration for this - hdds.container.balancer.exclude.containers. The aim of this jira is to support this configuration in ContainerBalancerStartSubcommand similar to the existing options.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-14619
How was this patch tested?
Manually tested using the following commands.
Creating Imbalance:
Recomissioning the node:
Running the balancer with --exclude-containers CLI command:
Logs showing container 1 is avoided:
Running the balancer without the --exclude-containers CLI command:
Logs showing container 1 is not avoided: