Skip to content

Fix CGroupsV2 test - #14355

Merged
knative-prow[bot] merged 3 commits into
knative:mainfrom
mgencur:cgroups_v2_fix
Sep 13, 2023
Merged

knative-prow[bot] merged 3 commits into
knative:mainfrom
mgencur:cgroups_v2_fix

Conversation

@mgencur

@mgencur mgencur commented Sep 12, 2023

Copy link
Copy Markdown
Contributor

The tests sometimes fail with CGroups V2:

  === CONT  TestShouldHaveCgroupReadOnly
    cgroup_test.go:155: Error getting cgroup information: strconv.Atoi: parsing "max": invalid syntax 
  === CONT  TestMustHaveCgroupConfigured
    cgroup_test.go:90: using cgroupv2
    cgroup_test.go:120: /sys/fs/cgroup/cpu.max = 100000, want: 1000
    cgroup_test.go:120: /sys/fs/cgroup/cpu.weight = 5, want: 128 

Proposed Changes

  • Store CGroups information as strings (e.g. cgroup/cpu.max or cgroup/memory.max can be a string or have multiple values)
  • Compute cpu.max correctly for CGroups V2

Release Note


@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 Sep 12, 2023
@codecov

codecov Bot commented Sep 12, 2023 •

Copy link
Copy Markdown

Codecov Report

Patch coverage has no change and project coverage change: +0.01% 🎉

Comparison is base (a8a8be2) 86.13% compared to head (045dfa4) 86.15%.
Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14355      +/-   ##
==========================================
+ Coverage   86.13%   86.15%   +0.01%     
==========================================
  Files         196      196              
  Lines       14781    14787       +6     
==========================================
+ Hits        12732    12739       +7     
- Misses       1742     1743       +1     
+ Partials      307      305       -2     

see 6 files with indirect coverage changes

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

@dprotaso

Copy link
Copy Markdown
Member

/assign @nak3

@nak3

nak3 commented Sep 13, 2023

Copy link
Copy Markdown
Contributor

Thank you so much!
I realized that why previous PR passed the CI on upstream. We need to update ubuntu-20.04 to ubustu-latest which uses cgroup v2 in test step. (I updated build step only).

https://github.com/mgencur/serving-1/blob/cgroups_v2_fix/.github/workflows/kind-e2e.yaml#L85

Could you update it to ubuntu-latest?

@mgencur

mgencur commented Sep 13, 2023

Copy link
Copy Markdown
Contributor Author

Could you update it to ubuntu-latest?

@nak3 Thanks for the pointer. Updated.

@nak3

nak3 commented Sep 13, 2023

Copy link
Copy Markdown
Contributor

/lgtm
/approve

@knative-prow knative-prow Bot added the lgtm Indicates that a PR is ready to be merged. label Sep 13, 2023
@knative-prow

knative-prow Bot commented Sep 13, 2023

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mgencur, nak3

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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 Sep 13, 2023
@knative-prow
knative-prow Bot merged commit 32c2732 into knative:main Sep 13, 2023
mgencur added a commit to mgencur/serving-1 that referenced this pull request Sep 13, 2023
* Fix CGroupsV2 test

* Fix comment
openshift-merge-robot pushed a commit to openshift-knative/serving that referenced this pull request Sep 13, 2023
* Fix CGroupsV2 test

* Fix comment
openshift-cherrypick-robot pushed a commit to openshift-cherrypick-robot/knative-serving that referenced this pull request Sep 13, 2023
* Fix CGroupsV2 test

* Fix comment
openshift-merge-robot pushed a commit to openshift-knative/serving that referenced this pull request Sep 14, 2023
* Fix CGroupsV2 test

* Fix comment

Co-authored-by: Martin Gencur <[email protected]>
skonto pushed a commit to skonto/serving that referenced this pull request Oct 5, 2023
* Fix CGroupsV2 test

* Fix comment

Co-authored-by: Martin Gencur <[email protected]>
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.

3 participants