-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Support conformance test with cgroup v2 #14297
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nak3 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #14297 +/- ##
==========================================
- Coverage 86.25% 86.21% -0.04%
==========================================
Files 195 195
Lines 14702 14702
==========================================
- Hits 12681 12676 -5
- Misses 1720 1725 +5
Partials 301 301 ☔ View full report in Codecov by Sentry. |
var ( | ||
yes = true | ||
no = false | ||
) | ||
|
||
func cgroupPaths() []string { | ||
cgroupv2File := "/sys/fs/cgroup/cgroup.controllers" | ||
_, err := os.Stat(cgroupv2File) |
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.
k8s docs https://kubernetes.io/docs/concepts/architecture/cgroups/ mentions stat -fc %T /sys/fs/cgroup/
to determine cgroup v2 or not. But verifying of existence of "/sys/fs/cgroup/cgroup.controllers"
should be alright as well. (it makes much simpler.)
Actually k8s also uses it for test https://github.com/search?q=repo%3Akubernetes%2Fkubernetes%20%22%2Fsys%2Ffs%2Fcgroup%2Fcgroup.controllers%22&type=code
Just for reference, nak3#68 verified CGroup v1 (ubuntu-20.04) as well. |
/lgtm |
* Support conformance test with cgroup v2
* Support conformance test with cgroup v2
* Support conformance test with cgroup v2
* Support conformance test with cgroup v2 Co-authored-by: Kenjiro Nakayama <nakayamakenjiro@gmail.com>
Fixes #13529
Proposed Changes
This patch supports conformance test with Cgroup v2.
It also changes to use ubuntu-latest image, which uses cgroup v2, on KinD e2e.
Release Note
TODO: After this patch merged, knative/specs#105 should be solved.