cruise-control
cruise-control copied to clipboard
cgroups v2 support
Ubuntu 22.04 uses cgroups v2 which has a different file layout from cgroups v1. This leads to an exception when cruise.control.metrics.reporter.kubernetes.mode is set to true:
[2022-08-02 11:58:20,825] WARN Failed to send Cruise Control metric [TOPIC_METRIC,TOPIC_PRODUCE_REQUEST_RATE,time=1659441495306,brokerId=0,topic=__consumer_offsets,value=0.141] (com.linkedin.kafka.cruisecontrol.metricsreporter.CruiseControlMetricsReporter)
[2022-08-02 11:59:15,327] ERROR Got exception in Cruise Control metrics reporter (com.linkedin.kafka.cruisecontrol.metricsreporter.CruiseControlMetricsReporter)
java.io.FileNotFoundException: /sys/fs/cgroup/cpu/cpu.cfs_quota_us (No such file or directory)
Don't know if it's worth fixing or it should be just documented/deprecated/removed. Java cgroup v2 support was added in recent versions (https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8230305) and reporting should work correctly without kubernetes.mode.
I'm interested in contributing to this issue, so before I start working it, would you mind sparing your time explaining what the fix will be like and pointing me to some resources to get started.
Hey @sreenath-tm You're Still Working On This Issue . I Also Like To Contribute This PR
Hi @AnvarKhatik I am still waiting for a confirmation from the author to get started. If you feel you can start without any guidance please go ahead.
To be honest, I think it would be best to remove this code and configuration options. Cgroups v1 support has been added to JDK 8 and up: https://bugs.openjdk.org/browse/JDK-8226575 Cgroups v2 support has been added to JDK 11.0.16 and 17.0.4. So the only JDK that doesn't support it is JDK 8, but cruise-control doesn't support JDK 8.
The original code was added with this pull request: https://github.com/linkedin/cruise-control/pull/1277
We are also experiencing problems with cgroup 2, will there be a fix? Ubuntu no longer supports cgroup 1