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

Support conformance test with cgroup v2 #14297

Merged
merged 3 commits into from
Aug 25, 2023
Merged

Conversation

nak3
Copy link
Contributor

@nak3 nak3 commented Aug 25, 2023

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

NONE

TODO: After this patch merged, knative/specs#105 should be solved.

@knative-prow knative-prow bot added area/test-and-release It flags unit/e2e/conformance/perf test issues for product features size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 25, 2023
@knative-prow
Copy link

knative-prow bot commented Aug 25, 2023

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 25, 2023
@codecov
Copy link

codecov bot commented Aug 25, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.04% ⚠️

Comparison is base (9ac8996) 86.25% compared to head (ef9f770) 86.21%.
Report is 1 commits behind head on main.

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              

see 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

var (
yes = true
no = false
)

func cgroupPaths() []string {
cgroupv2File := "/sys/fs/cgroup/cgroup.controllers"
_, err := os.Stat(cgroupv2File)
Copy link
Contributor Author

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

@nak3
Copy link
Contributor Author

nak3 commented Aug 25, 2023

Just for reference, nak3#68 verified CGroup v1 (ubuntu-20.04) as well.

@mgencur
Copy link
Contributor

mgencur commented Aug 25, 2023

/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Aug 25, 2023
@knative-prow knative-prow bot merged commit d39a379 into knative:main Aug 25, 2023
63 checks passed
nak3 added a commit to nak3/serving that referenced this pull request Aug 29, 2023
* Support conformance test with cgroup v2
openshift-merge-robot pushed a commit to openshift-knative/serving that referenced this pull request Aug 29, 2023
* Support conformance test with cgroup v2
openshift-cherrypick-robot pushed a commit to openshift-cherrypick-robot/knative-serving that referenced this pull request Aug 29, 2023
* Support conformance test with cgroup v2
openshift-merge-robot pushed a commit to openshift-knative/serving that referenced this pull request Aug 29, 2023
* Support conformance test with cgroup v2

Co-authored-by: Kenjiro Nakayama <nakayamakenjiro@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/test-and-release It flags unit/e2e/conformance/perf test issues for product features lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Conformance tests fail on systems using cgroups v2
2 participants