Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[INTERNAL] Allow intra-broker goals to be used as default #2

Conversation

alexander-falca
Copy link
Member

This PR resolves linkedin#1264

It seems that intra.broker.goals setting is checked at config validation only and this PR updates sanity check logic.

Adding WIP label while testing in dev env.

amuraru and others added 7 commits June 25, 2021 19:22
@amuraru
Copy link

amuraru commented Jul 12, 2021

@alexander-falca I am not sure if this is enough to implement linkedin#1264

The need for us is to have the intra-broker goals available in self.healer. Meaning that similarly to the other inter brokers goals we'd need the healer to continously analyze these intra-broker goals and self-heal them automatically.
CC maintainers suggested we could have a second healer - one dedicated for these goals - that can run in parallel with the current one.

@amuraru amuraru force-pushed the master branch 3 times, most recently from b44a99b to 98329c7 Compare July 27, 2021 09:58
@amuraru amuraru force-pushed the master branch 8 times, most recently from 127bb51 to 3ad6de3 Compare September 10, 2021 09:51
@amuraru amuraru force-pushed the master branch 2 times, most recently from ee040d3 to 6edd114 Compare September 11, 2021 11:28
@ecojan
Copy link

ecojan commented Oct 6, 2021

Small things to mention:

Building the image via docker build should be stated to be started from the root path of the project using since the dockerfile is not residing in the root folder:

export TAG=v1.0.0-sometag
docker build -t cc-image:$TAG -f ./docker/Dockerfile .
  • topic.config.provider has changed default value and com.linkedin.kafka.cruisecontrol.config.KafkaAdminTopicConfigProvider does not exist anymore
  • min.topic.leaders.per.broker has a minimum of 1 now (-1 is not allowed)

Goals seem to be added successfully to the list of goals for self-healing, in the UI, the proposals tab has a generic table that doesn't do any justice to the intra-broker goals.

IntraBrokerDiskUsageDistributionGoal is also requiring 20 snapshots by default (so partition movements via this goal will wait a lot of something changes in the cluster, eg. replica movement)

@ecojan
Copy link

ecojan commented Oct 7, 2021

Found the following error in logs

[2021-10-07 09:27:23,902] ERROR Uncaught exception in anomaly handler. (com.linkedin.kafka.cruisecontrol.detector.AnomalyDetectorManager)
com.linkedin.kafka.cruisecontrol.exception.KafkaCruiseControlException: java.lang.IllegalArgumentException: IntraBrokerDiskCapacityGoal does not support balancing action not specifying logdir.
	at com.linkedin.kafka.cruisecontrol.servlet.handler.async.runnable.GoalBasedOperationRunnable.computeResult(GoalBasedOperationRunnable.java:167) ~[cruise-control.jar:?]
	at com.linkedin.kafka.cruisecontrol.servlet.handler.async.runnable.RebalanceRunnable.workWithoutClusterModel(RebalanceRunnable.java:115) ~[cruise-control.jar:?]
	at com.linkedin.kafka.cruisecontrol.servlet.handler.async.runnable.GoalBasedOperationRunnable.computeResult(GoalBasedOperationRunnable.java:173) ~[cruise-control.jar:?]
	at com.linkedin.kafka.cruisecontrol.detector.GoalViolations.fix(GoalViolations.java:89) ~[cruise-control.jar:?]
	at com.linkedin.kafka.cruisecontrol.detector.AnomalyDetectorManager$AnomalyHandlerTask.fixAnomalyInProgress(AnomalyDetectorManager.java:547) ~[cruise-control.jar:?]
	at com.linkedin.kafka.cruisecontrol.detector.AnomalyDetectorManager$AnomalyHandlerTask.processAnomalyInProgress(AnomalyDetectorManager.java:413) ~[cruise-control.jar:?]
	at com.linkedin.kafka.cruisecontrol.detector.AnomalyDetectorManager$AnomalyHandlerTask.handleAnomalyInProgress(AnomalyDetectorManager.java:396) ~[cruise-control.jar:?]
	at com.linkedin.kafka.cruisecontrol.detector.AnomalyDetectorManager$AnomalyHandlerTask.run(AnomalyDetectorManager.java:358) [cruise-control.jar:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) [?:?]
	at java.lang.Thread.run(Thread.java:831) [?:?]
Caused by: java.lang.IllegalArgumentException: IntraBrokerDiskCapacityGoal does not support balancing action not specifying logdir.
	at com.linkedin.kafka.cruisecontrol.analyzer.goals.IntraBrokerDiskCapacityGoal.actionAcceptance(IntraBrokerDiskCapacityGoal.java:129) ~[cruise-control.jar:?]
	at com.linkedin.kafka.cruisecontrol.analyzer.AnalyzerUtils.isProposalAcceptableForOptimizedGoals(AnalyzerUtils.java:121) ~[cruise-control.jar:?]
	at com.linkedin.kafka.cruisecontrol.analyzer.goals.AbstractGoal.maybeApplyBalancingAction(AbstractGoal.java:254) ~[cruise-control.jar:?]
	at com.linkedin.kafka.cruisecontrol.analyzer.goals.MinTopicLeadersPerBrokerGoal.maybeMoveLeaderOfTopicToBroker(MinTopicLeadersPerBrokerGoal.java:340) ~[cruise-control.jar:?]
	at com.linkedin.kafka.cruisecontrol.analyzer.goals.MinTopicLeadersPerBrokerGoal.rebalanceForBroker(MinTopicLeadersPerBrokerGoal.java:316) ~[cruise-control.jar:?]
	at com.linkedin.kafka.cruisecontrol.analyzer.goals.AbstractGoal.optimize(AbstractGoal.java:100) ~[cruise-control.jar:?]
	at com.linkedin.kafka.cruisecontrol.analyzer.GoalOptimizer.optimizations(GoalOptimizer.java:447) ~[cruise-control.jar:?]
	at com.linkedin.kafka.cruisecontrol.KafkaCruiseControl.optimizations(KafkaCruiseControl.java:583) ~[cruise-control.jar:?]
	at com.linkedin.kafka.cruisecontrol.servlet.handler.async.runnable.ProposalsRunnable.workWithClusterModel(ProposalsRunnable.java:114) ~[cruise-control.jar:?]
	at com.linkedin.kafka.cruisecontrol.servlet.handler.async.runnable.GoalBasedOperationRunnable.computeResult(GoalBasedOperationRunnable.java:161) ~[cruise-control.jar:?]
	... 13 more

@ecojan
Copy link

ecojan commented Oct 7, 2021

Does the same for "IntraBrokerDiskUsageDistributionGoal" as well.

@alexander-falca
Copy link
Member Author

Closing in favour of linkedin#1721

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to use intra.broker.goals in anomaly detection / self healing
3 participants