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
cgroups: fix controller filesystem path in cgroup v2 #961
Conversation
askervin
commented
Dec 15, 2022
- Fixes page demotion in cgroup v2. This was failing because GetProcesses() and GetCgroupDir() did not work.
bb6e162
to
0656dab
Compare
Codecov Report
@@ Coverage Diff @@
## master #961 +/- ##
==========================================
- Coverage 33.74% 33.68% -0.06%
==========================================
Files 61 61
Lines 9140 9156 +16
==========================================
Hits 3084 3084
- Misses 5773 5789 +16
Partials 283 283
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
- Fixes page demotion in cgroup v2. This was failing because GetProcesses() and GetCgroupDir() did not work.
0656dab
to
ccc43c2
Compare
@@ -83,3 +88,14 @@ func init() { | |||
flag.StringVar(&KubeletRoot, "kubelet-cgroup-root", KubeletRoot, | |||
"--cgroup-root options the kubelet is running with") | |||
} | |||
|
|||
func DetectSystemCgroupVersion() int { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest to do smth like this instead, possibly import/copy it directly
https://github.com/containerd/cgroups/blob/e8802a182774b8e25cc65b5c374389338cc8e6c3/utils.go#L53
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can go with this, too