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

vendor: bump runc to 1.0.2 #104528

Merged
merged 2 commits into from Aug 26, 2021
Merged

Conversation

kolyshkin
Copy link
Contributor

@kolyshkin kolyshkin commented Aug 23, 2021

What type of PR is this?

/kind bug

What this PR does / why we need it:

This bumps runc to 1.0.2. For the complete release notes, see https://github.com/opencontainers/runc/releases/tag/v1.0.2

In particular, this fixes the check cgroup v1 systemd manager check
if a container needs to be frozen before Set(), and adds a knob to
skip the check/freeze entirely (used from this PR).

Which issue(s) this PR fixes:

Fixes #104280

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Fixes a regression in 1.22 with occasional pod cgroup freeze when using cgroup v1 and systemd driver.

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

None

For the complete release notes, see
 - https://github.com/opencontainers/runc/releases/tag/v1.0.2

In particular, this fixes the check cgroup v1 systemd manager check
if a container needs to be frozen before Set(), and adds a knob to
skip the check/freeze entirely (to be used by the next commit).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This is a knob added by runc 1.0.2 specifically for kubernetes,
which tells runc/libcontainer/cgroups/systemd v1 manager to not
freeze the cgroup in Set().

We set this knob here because this code is only used for pods
(rather than containers) management, and in this place we create or
update the pod cgroup with no device limits set, so we can skip the
freeze.

If this knob is not set, libcontainer's cgroup v1 manager tries to
figure out whether the freeze is needed or not, but it's a somewhat
expensive check to perform, thus the knob is a shortcut.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. size/S Denotes a PR that changes 10-29 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-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 23, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @kolyshkin. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Aug 23, 2021
@k8s-ci-robot k8s-ci-robot requested review from logicalhan, resouer and a team August 23, 2021 21:03
@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 Aug 23, 2021
@kolyshkin
Copy link
Contributor Author

@odinuge @liggitt @ehashman PTAL

@mrunalp
Copy link
Contributor

mrunalp commented Aug 23, 2021

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 23, 2021
@mrunalp
Copy link
Contributor

mrunalp commented Aug 24, 2021

/test pull-kubernetes-integration

@harche
Copy link
Contributor

harche commented Aug 24, 2021

/pull pull-kubernetes-node-crio-e2e

@harche
Copy link
Contributor

harche commented Aug 24, 2021

/test pull-kubernetes-node-crio-e2e

@@ -379,7 +379,8 @@ func getSupportedUnifiedControllers() sets.String {

func (m *cgroupManagerImpl) toResources(resourceConfig *ResourceConfig) *libcontainerconfigs.Resources {
resources := &libcontainerconfigs.Resources{
SkipDevices: true,
SkipDevices: true,
SkipFreezeOnSet: true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we also set up libcontainerconfigs.Resources and set SkipDevices: true in these places:

Resources: &configs.Resources{
SkipDevices: true,
},

Resources: &configs.Resources{
Memory: int64(memoryLimit),
MemorySwap: -1,
SkipDevices: true,
},

should those set this new option as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No (I should have explained it earlier but didn't know where to).

The reason is, SkipFreezeOnSet only makes sense for systemd v1 manager, and is ignored otherwise. In these two places you quoted we use fs[2] manager, i.e. no systemd involved.

In other words, it wouldn't hurt to set it, but it's useless (and may be misleading for those who read the code later).

@harche
Copy link
Contributor

harche commented Aug 24, 2021

/test pull-kubernetes-node-crio-cgrpv2-e2e

@harche
Copy link
Contributor

harche commented Aug 24, 2021

/test pull-kubernetes-node-crio-e2e

@harche
Copy link
Contributor

harche commented Aug 24, 2021

/test pull-kubernetes-node-crio-cgrpv2-e2e

@liggitt
Copy link
Member

liggitt commented Aug 24, 2021

ok

/approve
for dependency updates

Will leave lgtm to node reviewer. Is it expected that CI job is failing?

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kolyshkin, liggitt

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 24, 2021
@odinuge
Copy link
Member

odinuge commented Aug 24, 2021

/lgtm
/priority critical-urgent
/triage accepted

This needs a release note tho, so holding for that.
/hold

Is it expected that CI job is failing?

Hmm. Looks like it is flaking.. Strange. It is however running on cgroup v2, and that is still "experimenta" since we doesn't have any good CI signals for it.

/test pull-kubernetes-node-crio-cgrpv2-e2e

And some others, just to check:

/test pull-kubernetes-node-kubelet-serial-crio-cgroupv1
/test pull-kubernetes-node-kubelet-serial-crio-cgroupv2
/test pull-kubernetes-node-kubelet-serial-containerd
/test pull-kubernetes-node-kubelet-serial

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Aug 24, 2021
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 24, 2021
@k8s-ci-robot
Copy link
Contributor

@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 Rerun command
pull-kubernetes-node-crio-cgrpv2-e2e c06a851 link /test pull-kubernetes-node-crio-cgrpv2-e2e
pull-kubernetes-node-kubelet-serial-crio-cgroupv1 c06a851 link /test pull-kubernetes-node-kubelet-serial-crio-cgroupv1
pull-kubernetes-node-kubelet-serial-crio-cgroupv2 c06a851 link /test pull-kubernetes-node-kubelet-serial-crio-cgroupv2
pull-kubernetes-node-kubelet-serial-containerd c06a851 link /test pull-kubernetes-node-kubelet-serial-containerd
pull-kubernetes-node-kubelet-serial c06a851 link /test pull-kubernetes-node-kubelet-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.

@mrunalp
Copy link
Contributor

mrunalp commented Aug 24, 2021

The crio cgroups v2 test failure is a known problem. @harche Did we have an issue for it?

@harche
Copy link
Contributor

harche commented Aug 25, 2021

The crio cgroups v2 test failure is a known problem. @harche Did we have an issue for it?

cgroups v1 flaking - #104568
cgroups v2 failing - #104567

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Aug 25, 2021
@rphillips
Copy link
Member

release note added
/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 25, 2021
@k8s-ci-robot k8s-ci-robot merged commit cbd0611 into kubernetes:master Aug 26, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.23 milestone Aug 26, 2021
@liggitt liggitt added the kind/regression Categorizes issue or PR as related to a regression from a prior release. label Apr 27, 2022
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/dependency Issues or PRs related to dependency changes area/kubelet cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. kind/regression Categorizes issue or PR as related to a regression from a prior release. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/node Categorizes an issue or PR as relevant to SIG Node. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kubelet regularly freeze control groups causing issues further down
7 participants