Skip to content
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

Merged
merged 1 commit into from Dec 20, 2022

Conversation

askervin
Copy link
Contributor

  • Fixes page demotion in cgroup v2. This was failing because GetProcesses() and GetCgroupDir() did not work.

@codecov-commenter
Copy link

Codecov Report

Merging #961 (0656dab) into master (759f717) will decrease coverage by 0.05%.
The diff coverage is 0.00%.

@@            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              
Impacted Files Coverage Δ
pkg/cgroups/cgroupcontrol.go 0.00% <0.00%> (ø)
pkg/cgroups/cgrouppath.go 25.00% <0.00%> (-8.34%) ⬇️

📣 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.
@@ -83,3 +88,14 @@ func init() {
flag.StringVar(&KubeletRoot, "kubelet-cgroup-root", KubeletRoot,
"--cgroup-root options the kubelet is running with")
}

func DetectSystemCgroupVersion() int {
Copy link
Contributor

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

Copy link
Contributor

@marquiz marquiz left a 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

@marquiz marquiz merged commit 0b11e4a into intel:master Dec 20, 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.

None yet

4 participants