This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
[Bug]: Include default capacity for cruise control #11212
Labels
You can continue the conversation there. Go to discussion →
Bug Description
When I create a kafka cluster with cruisecontrol, the operator creates a configmap with capacity settings for specific brokers managed by strimzi. When connecting an external broker to a strimzi cluster, the capacity for that broker is not in the configmap and cruisecontrol fails because of a null pointer. Default value for brokers should be defined with id “-1” according to cruise control. Would it be correct to extend the capacity.json file with an additional entry with id “-1” with default capacity brokers?
I am testing a specific case of connecting an external cluster to a strimzi cluster to replicate data using cruisecontrol.
Steps to reproduce
Expected behavior
capacity.json should include default capacity with id "-1"
https://github.com/linkedin/cruise-control/wiki/Configurations#populating-the-capacity-config-file
Strimzi version
0.45.0
Kubernetes version
1.29.2
Installation method
No response
Infrastructure
No response
Configuration files and logs
2025-03-02 20:54:58 ERROR GoalOptimizer:615 - Proposal precomputation encountered error
com.linkedin.kafka.cruisecontrol.exception.BrokerCapacityResolutionException: Unable to resolve capacity of broker 3. Either (1) adding the default broker capacity (via adding capacity for broker -1 and allowing capacity estimation) or (2) adding missing broker's capacity in file /opt/cruise-control/custom-config/capacity.json.
at com.linkedin.kafka.cruisecontrol.config.BrokerCapacityConfigFileResolver.capacityForBroker(BrokerCapacityConfigFileResolver.java:181) ~[cruise-control-2.5.138.jar:?]
at com.linkedin.kafka.cruisecontrol.monitor.LoadMonitor.populateClusterCapacity(LoadMonitor.java:586) ~[cruise-control-2.5.138.jar:?]
at com.linkedin.kafka.cruisecontrol.monitor.LoadMonitor.clusterModel(LoadMonitor.java:516) ~[cruise-control-2.5.138.jar:?]
at com.linkedin.kafka.cruisecontrol.monitor.LoadMonitor.clusterModel(LoadMonitor.java:472) ~[cruise-control-2.5.138.jar:?]
at com.linkedin.kafka.cruisecontrol.monitor.LoadMonitor.clusterModel(LoadMonitor.java:442) ~[cruise-control-2.5.138.jar:?]
at com.linkedin.kafka.cruisecontrol.analyzer.GoalOptimizer$ProposalCandidateComputer.run(GoalOptimizer.java:603) ~[cruise-control-2.5.138.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
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:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:840) ~[?:?]
Additional context
No response
The text was updated successfully, but these errors were encountered: