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
kubelet/cm: bump runc/libcontainer to 1.1.0 #107149
Conversation
/retest |
OK, it works with these 4 commits. Let's add more. |
769a312
to
c359c7f
Compare
/test pull-kubernetes-integration |
The /test pull-kubernetes-integration |
c359c7f
to
4f974eb
Compare
This updates vendored runc/libcontainer to 1.1.0, and google/cadvisor to a version updated to runc 1.1.0-rc1 (google/cadvisor#3031). Changes in vendor are generated by (roughly): ./hack/pin-dependency.sh github.com/google/cadvisor v0.44.0 ./hack/pin-dependency.sh github.com/opencontainers/runc v1.1.0 ./hack/update-vendor.sh ./hack/lint-dependencies.sh # And follow all its recommendations. ./hack/update-vendor.sh ./hack/update-internal-modules.sh ./hack/lint-dependencies.sh # Re-check everything again. The changes (mostly in pkg/kubelet/cm) are there to adopt changed runc 1.1 API, and simplify things a bit. In particular: 1. simplify cgroup manager instantiation, using a new, easier way of libcontainers/cgroups/manager.New; 2. replace libcontainerAdapter with a boolean variable (all it did was passing on whether systemd manager should be used); 3. trivial change due to removed cgroupfs.HugePageSizes and added cgroups.HugePageSizes(); 4. do not calculate cgroup paths in update / destroy, since libcontainer cgroup managers now calculate the paths upon creation (previously, they were doing that only in Apply, so using e.g. Set or Destroy right after creation was impossible without specifying paths). We currently still calculate cgroup paths in Exists -- this is to be addressed separately. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Rebased on top of just-merged #108597; no longer a draft |
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.
Changes looks good to me now! I have looked through the code with the previous regressions we have seen, and I haven't found any red flags this time. Thanks for pushing @kolyshkin
/lgtm
But lets hold some time to let the CI run for the other changes (eg. this run https://prow.k8s.io/view/gs/kubernetes-jenkins/logs/ci-cos-cgroupv2-containerd-node-e2e-serial/1506700583120146432 of ci-cos-cgroupv2-containerd-node-e2e-serial
).
Feel free to unhold when we have CI confidence about the other change.
/hold
/ok-to-test |
And lets test this one that failed; /test pull-kubernetes-node-swap-ubuntu-serial As well as this one that should pass; /test pull-kubernetes-node-kubelet-serial-containerd |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: giuseppe, kolyshkin, odinuge The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@kolyshkin: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/milestone v1.24 @kolyshkin can you please remove draft status on the PR and s/Switch/Update/ in the change note as well as noting the cadvisor version bump? |
/retest |
I think this needs rebase... |
@kolyshkin: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This has been replaced with #109029 |
/close |
@bobbypage: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
TL;DR: simplify/improve cgroup management code in kubelet/cm. Bump to runc 1.1.0.
This updates vendored runc/libcontainer to 1.1.0
(release notes at https://github.com/opencontainers/runc/releases)
and google/cadvisor to a version with PR google/cadvisor#3031 merged.
Changes in vendor are generated by (roughly):
Changes in pkg/kubelet/cm are to adopt new runc 1.1 libcontainer/cgroups
APIs and build on its improvements. In particular:
simplify cgroup manager instantiation, using a new, easier way of
libcontainers/cgroups/manager.New
;replace
libcontainerAdapter
with a boolean variable (all it didwas passing on whether systemd manager should be used);
trivial change due to removed
cgroupfs.HugePageSizes
and addedcgroups.HugePageSizes()
;do not calculate cgroup paths in update / destroy, since libcontainer
cgroup managers now calculate the paths upon creation (previously,
they were doing that only in
Apply
, so using e.g.Set
orDestroy
rightafter creation was impossible without specifying paths).
🔔 We currently still calculate cgroup paths in
Exists
-- this is to beaddressed separately.
Which issue(s) this PR fixes:
none
Special notes for your reviewer:
Please review commit by commit, and see individual commit messages for more details.
This is currently a draft, as the code is on top of kubelet/cm: refactor, prepare for runc 1.1 bump #108597. Once that PR is merged, this will be rebased.
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
none