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

kubelet/cm: bump runc/libcontainer to 1.1.0 #107149

Closed
wants to merge 1 commit into from

Conversation

kolyshkin
Copy link
Contributor

@kolyshkin kolyshkin commented Dec 20, 2021

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):

  ./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.

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 did
    was passing on whether systemd manager should be used);

  • trivial change due to removed cgroupfs.HugePageSizes and added
    cgroups.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 or Destroy right
    after creation was impossible without specifying paths).
    🔔 We currently still calculate cgroup paths in Exists -- this is to be
    addressed separately.

Which issue(s) this PR fixes:

none

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Switch to opencontainers/runc/libcontainer v1.1.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

none

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Dec 20, 2021
@k8s-ci-robot k8s-ci-robot added area/kubelet sig/node Categorizes an issue or PR as relevant to SIG Node. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Dec 20, 2021
@kolyshkin
Copy link
Contributor Author

/retest

@kolyshkin
Copy link
Contributor Author

OK, it works with these 4 commits. Let's add more.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 21, 2021
@kolyshkin
Copy link
Contributor Author

/test pull-kubernetes-integration

@kolyshkin
Copy link
Contributor Author

The TestCronJobLaunchesPodAndCleansUp failure in pull-kubernetes-integration seems to be an unrelated (but recent) flake, first observed in #106909 (comment)

/test pull-kubernetes-integration

@k8s-ci-robot k8s-ci-robot added area/apiserver area/cloudprovider area/code-generation area/dependency Issues or PRs related to dependency changes area/kubectl area/test sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/auth Categorizes an issue or PR as relevant to SIG Auth. labels Dec 23, 2021
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>
@kolyshkin
Copy link
Contributor Author

Rebased on top of just-merged #108597; no longer a draft

Copy link
Member

@odinuge odinuge left a 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

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 23, 2022
@odinuge
Copy link
Member

odinuge commented Mar 23, 2022

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Mar 23, 2022
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 23, 2022
@odinuge
Copy link
Member

odinuge commented Mar 23, 2022

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

@odinuge odinuge moved this from PRs Waiting on Author to PRs - Needs Reviewer in SIG Node CI/Test Board Mar 23, 2022
@odinuge odinuge moved this from Waiting on Author to Needs Reviewer in SIG Node PR Triage Mar 23, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: giuseppe, kolyshkin, odinuge
To complete the pull request process, please ask for approval from smarterclayton after the PR has been reviewed.

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

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Mar 23, 2022

@kolyshkin: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubernetes-node-kubelet-serial-crio-cgroupv2 a19343d4bb8b6924763361685a67bba4c75ec414 link false /test pull-kubernetes-node-kubelet-serial-crio-cgroupv2
pull-kubernetes-node-crio-cgrpv2-e2e a19343d4bb8b6924763361685a67bba4c75ec414 link false /test pull-kubernetes-node-crio-cgrpv2-e2e
pull-kubernetes-node-kubelet-serial-crio-cgroupv1 a19343d4bb8b6924763361685a67bba4c75ec414 link false /test pull-kubernetes-node-kubelet-serial-crio-cgroupv1
pull-kubernetes-node-kubelet-serial-cpu-manager a19343d4bb8b6924763361685a67bba4c75ec414 link false /test pull-kubernetes-node-kubelet-serial-cpu-manager
pull-kubernetes-node-kubelet-serial-topology-manager a19343d4bb8b6924763361685a67bba4c75ec414 link false /test pull-kubernetes-node-kubelet-serial-topology-manager
pull-kubernetes-node-kubelet-serial-hugepages a19343d4bb8b6924763361685a67bba4c75ec414 link false /test pull-kubernetes-node-kubelet-serial-hugepages
pull-kubernetes-node-kubelet-serial-memory-manager a19343d4bb8b6924763361685a67bba4c75ec414 link false /test pull-kubernetes-node-kubelet-serial-memory-manager
pull-kubernetes-node-memoryqos-cgrpv2 a19343d4bb8b6924763361685a67bba4c75ec414 link false /test pull-kubernetes-node-memoryqos-cgrpv2
pull-kubernetes-node-crio-e2e a19343d4bb8b6924763361685a67bba4c75ec414 link false /test pull-kubernetes-node-crio-e2e
pull-kubernetes-node-crio-cgrpv2-e2e-kubetest2 a19343d4bb8b6924763361685a67bba4c75ec414 link false /test pull-kubernetes-node-crio-cgrpv2-e2e-kubetest2
pull-kubernetes-node-swap-fedora a19343d4bb8b6924763361685a67bba4c75ec414 link false /test pull-kubernetes-node-swap-fedora
pull-kubernetes-node-crio-e2e-kubetest2 a19343d4bb8b6924763361685a67bba4c75ec414 link false /test pull-kubernetes-node-crio-e2e-kubetest2
pull-kubernetes-node-swap-fedora-serial a19343d4bb8b6924763361685a67bba4c75ec414 link false /test pull-kubernetes-node-swap-fedora-serial

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.

@ehashman ehashman moved this from Needs Reviewer to Needs Approver in SIG Node PR Triage Mar 24, 2022
@ehashman
Copy link
Member

ehashman commented Mar 24, 2022

/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?

@k8s-ci-robot k8s-ci-robot added this to the v1.24 milestone Mar 24, 2022
@ehashman ehashman moved this from PRs - Needs Reviewer to Archive-it in SIG Node CI/Test Board Mar 24, 2022
@odinuge
Copy link
Member

odinuge commented Mar 24, 2022

/retest

@ehashman
Copy link
Member

I think this needs rebase...

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 25, 2022
@k8s-ci-robot
Copy link
Contributor

@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.

@bobbypage
Copy link
Member

This has been replaced with #109029

@bobbypage
Copy link
Member

/close

@k8s-ci-robot
Copy link
Contributor

@bobbypage: Closed this PR.

In response to this:

/close

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.

SIG Node PR Triage automation moved this from Needs Approver to Done Mar 25, 2022
@ritazh ritazh removed this from Needs Triage in SIG Auth Old Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/apiserver area/cloudprovider area/code-generation area/dependency Issues or PRs related to dependency changes area/kubectl area/kubelet area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/cli Categorizes an issue or PR as relevant to SIG CLI. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/storage Categorizes an issue or PR as relevant to SIG Storage. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Development

Successfully merging this pull request may close these issues.

None yet