Repository navigation
Mount /sys/fs/cgroup as cgroup2 type if supported - #9094
Conversation
|
Thanks for the PR @mariash! Can you sign-off your PR's please to get the DCO check passing: https://github.com/concourse/concourse/pull/9094/checks?check_run_id=38206512380 |
|
Looks like unit tests flaked. Running again for you. |
|
This all relies on a certain version of Garden, correct? Anything >= 1.67.0? |
|
Updated OP to state that this PR closes #9063 |
taylorsilva
left a comment
There was a problem hiding this comment.
LGTM - Please sign-off your commits and then I can merge this.
Signed-off-by: Maria Shaldybin <[email protected]>
|
@taylorsilva I signed off the commit. Yes, it needs garden 1.67.0 Thank you! |
|
@taylorsilva FYI after this PR, we can't build concourse worker binaries on darwin and windows anymore
|
|
Thanks for the heads up. I should add this as a check to the PRs pipeline. I'll work on a fix. |
We've had a few PR's that are specific to our linux-containerd implementation: #9017 and #9094 After these PR's folks in the community found that they couldn't compile Concourse for non-Linux platforms. This commit tries to make it easier for future contributors to make changes to the containerd-linux runtime and not accidently break things for non-linux platforms. Signed-off-by: Taylor Silva <[email protected]>
Changes proposed by this PR
Closes #9063
Concourse is failing to run on systems that only support cgroup v2 since it is trying to mount /sys/fs/cgroup into container as "cgroup" type. For cgroups v2 it should be "cgroup2" type. Use "cgroups.IsCgroup2UnifiedMode()" method to determine if system supports cgroups v2 and if it is then mount it inside of container.
Notes to reviewer
IsCgroup2UnifiedMode method is memoizing the cgroup mode.
Release Note
/sys/fs/cgroupas cgroup2 type if supported. Requires Garden v1.67.0 or greater