Skip to content

Conversation

@PaulFurtado
Copy link
Member

Disclaimer: untested, need someone to get this built for me so we can test internally, but wanted to get the ball rolling.

On HubSpot's legacy systems, cgroups look like:

4:cpuacct:/hs_high_priority/mesos/83df193b-5cd3-4393-986a-f992dd284b03
3:cpu:/hs_high_priority/mesos/83df193b-5cd3-4393-986a-f992dd284b03

but on centos 8 systems, they look like:

2:cpu,cpuacct:/hs_high_priority/mesos/fb69d013-4e17-45fe-b47b-dde6a177a3a3

Parsers for /proc/pid/cgroup are supposed to split the subsystems field on , to determine which subsystems the line is for. Additionally, they should do a maxsplit of 3 to deal with cgroup names that may contain semicolons.

This PR should fix this error on CentOS 8 hosts:

java.lang.RuntimeException: Found no cpu cgroup from output [11:freezer:/hs_high_priority/mesos/f99d4218-bb4d-49f9-bd10-b47be89c3936, 10:devices:/system.slice/mesos-slave.service, 9:memory:/hs_high_priority/mesos/f99d4218-bb4d-49f9-bd10-b47be89c3936, 8:cpuset:/, 7:hugetlb:/, 6:blkio:/system.slice/mesos-slave.service, 5:net_cls,net_prio:/, 4:pids:/system.slice/mesos-slave.service, 3:perf_event:/, 2:cpu,cpuacct:/hs_high_priority/mesos/f99d4218-bb4d-49f9-bd10-b47be89c3936, 1:name=systemd:/hs_high_priority/mesos/f99d4218-bb4d-49f9-bd10-b47be89c3936]
        at com.hubspot.singularity.executor.SingularityExecutorCgroupCfsChecker.getCpuCgroupDirectory(SingularityExecutorCgroupCfsChecker.java:77)
        at com.hubspot.singularity.executor.SingularityExecutorCgroupCfsChecker.<init>(SingularityExecutorCgroupCfsChecker.java:53)
        at com.hubspot.singularity.executor.SingularityExecutorMonitor.lambda$startCgroupWatcher$0(SingularityExecutorMonitor.java:528)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

@PaulFurtado PaulFurtado force-pushed the handle_combined_cpu_cgroup branch from 8628841 to 1ecb1d3 Compare April 21, 2022 04:18
Copy link
Contributor

@WH77 WH77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@WH77 WH77 merged commit a4251e3 into master Apr 21, 2022
@PaulFurtado PaulFurtado deleted the handle_combined_cpu_cgroup branch April 21, 2022 16:17
@ssalinas ssalinas added this to the 1.5.0 milestone May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants