Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@haircommander
Copy link
Member

 The history here is a bit convoluted. Originally, runc created the cgroup for the infra container.
cAdvisor was built to assume the cgroup for the infra container would be created, and it uses
this to find the network metrics for the pod. When we dropped the infra container, cri-o needed to make this
cgroup so cAdvisor could still find the network metrics.

However, systemd didn't like the way we did it, and would remove the cgroup mid pod creation, which was fixed in
https://github.com/cri-o/cri-o/pull/6196. This actually caused the cgroup to not be created at all, which then caused
the networking metrics to not be gathered at all.

Thus, we do need to create a cgroup underneath the systemd cgroup. Attempt to use a slice for this, as systemd won't require a
process be underneath it.

What type of PR is this?

/kind bug

What this PR does / why we need it:

reverts #6196
fixes #6657

Which issue(s) this PR fixes:

Special notes for your reviewer:

cherry-pick of #6949

Does this PR introduce a user-facing change?

Fix a bug where network metrics collection is broken with systemd cgroup driver and dropped infra containers.

The history here is a bit convoluted. Originally, runc created the cgroup for the infra container.
cAdvisor was built to assume the cgroup for the infra container would be created, and it uses
this to find the network metrics for the pod. When we dropped the infra container, cri-o needed to make this
cgroup so cAdvisor could still find the network metrics.

However, systemd didn't like the way we did it, and would remove the cgroup mid pod creation, which was fixed in
cri-o#6196. This actually caused the cgroup to not be created at all, which then caused
the networking metrics to not be gathered at all.

Thus, we do need to create a cgroup underneath the systemd cgroup. Attempt to use a slice for this, as systemd won't require a
process be underneath it.

Signed-off-by: Peter Hunt <[email protected]>
- skip test for cgroupfs
- remove skip for runc 1.0.0-rc11 (very old now)
- drop removal of cgroup parent (not required)

Signed-off-by: Peter Hunt <[email protected]>
@openshift-ci openshift-ci bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Jun 1, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 1, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci bot added dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/bug Categorizes issue or PR as related to a bug. labels Jun 1, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 1, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: haircommander

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 1, 2023
@haircommander haircommander marked this pull request as ready for review June 1, 2023 20:21
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 1, 2023
@openshift-ci openshift-ci bot requested a review from nalind June 1, 2023 20:21
@codecov
Copy link

codecov bot commented Jun 1, 2023

Codecov Report

Merging #7009 (c01d5be) into release-1.23 (0bbb0d9) will decrease coverage by 0.11%.
The diff coverage is 6.81%.

❗ Current head c01d5be differs from pull request most recent head b4eb72d. Consider uploading reports for the commit b4eb72d to get more accurate results

Additional details and impacted files
@@               Coverage Diff                @@
##           release-1.23    #7009      +/-   ##
================================================
- Coverage         43.01%   42.90%   -0.11%     
================================================
  Files               123      123              
  Lines             12405    12440      +35     
================================================
+ Hits               5336     5338       +2     
- Misses             6560     6593      +33     
  Partials            509      509              

@haircommander haircommander added the lgtm Indicates that a PR is ready to be merged. label Jun 9, 2023
@openshift-merge-robot openshift-merge-robot merged commit bb2cc9a into cri-o:release-1.23 Jun 9, 2023
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. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants