-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
add systemd as cgroup driver #27943
add systemd as cgroup driver #27943
Conversation
Hi @akhilerm. 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 Once the patch is verified, the new status will be reflected by the 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. |
@endocrimes @adisky Can you take a look at this PR. Its related to setting cgroup driver to systemd, for all jobs for which image has been updated to |
Can you please add more details on the motivation for this change. |
/assign @bobbypage |
@@ -17,7 +17,7 @@ presets: | |||
- name: NON_MASQUERADE_CIDR | |||
value: 0.0.0.0/0 | |||
- name: KUBELET_TEST_ARGS | |||
value: --runtime-cgroups=/system.slice/containerd.service | |||
value: "--runtime-cgroups=/system.slice/containerd.service --cgroup-driver=systemd" |
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.
This assumes that all the jobs with preset-e2e-containerd
should use systemd cgroup driver, I don't think this is accuarete.
For example the job below ci-containerd-e2e-ubuntu-gce
uses the preset preset-e2e-containerd
, but it's running on ubuntu-2004-lts
which does not enable cgroupv2, so we shouldn't switch to use systemd cgroup driver.
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.
We should not need this -- for cluster e2e tests, the GCE node bootstrap scripts already configure --cgroup-driver=systemd
on cgroupv2 OS images (see https://github.com/kubernetes/kubernetes/blob/master/cluster/gce/gci/configure-helper.sh#L1630-L1633). So we only need to configure node e2e tests, not cluster e2e tests.
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.
Should we have a separate label preset for those jobs then?
Just thinking out loud. . We can have a new preset for tests that use cos image and preset-e2e-containerd
will be as is without any changes. Will it impact any other tests? Or that would be a huge change to do.
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.
Should we have a separate label preset for those jobs then?
That's one option, we don't have too many cluster e2e tests in config/jobs/kubernetes/sig-node/containerd.yaml
, so I think we can just also just update each them or setup a present and annotate with preset, up to you.
The important part is we only update the ones for systemd cgroup driver on the tests which are using cgroupv2 images.
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.
Except these 4 jobs, other have either systemd driver set or is using an older cos image
- ci-cos-containerd-node-e2e
- ci-cos-containerd-node-e2e-features
- ci-kubernetes-node-kubelet-lock-contention
- ci-kubernetes-node-kubelet-credential-provider
The above jobs have multiple images (ubuntu and cos stable) specified in the image config. So I am not sure how to update the --cgroup-driver
value for these jobs.
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.
I think the general rule we can follow is:
- If the job is pointing to an image config file that is using something older than COS M97 (or !=
cos-stable
), then let's keep it as is for now - Otherwise, for jobs pointing to image config file with
cos-stable
, let's also update it toubuntu 22.04
and also update cgroup driver to systemd.
/ok-to-test |
@@ -998,7 +998,7 @@ presubmits: | |||
- --gcp-zone=us-west1-b | |||
- '--node-test-args=--container-runtime-endpoint=unix:///run/containerd/containerd.sock | |||
--container-runtime-process-name=/usr/bin/containerd --container-runtime-pid-file= | |||
--kubelet-flags="--cgroups-per-qos=true --cgroup-root=/ --runtime-cgroups=/system.slice/containerd.service" | |||
--kubelet-flags="--cgroup-driver=systemd --cgroups-per-qos=true --cgroup-root=/ --runtime-cgroups=/system.slice/containerd.service" |
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.
changing previous release jobs sounds wrong. Let's have a separate copy of image config file for those locked on non cgroupv2 images
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.
I made the change to the release jobs since the referring image file had changed.
But it seems like the jobs itself on those branches are not failing after the update to cos-stable. So I think this change wont be needed.
Also a bit confused that, ideally if the image is using cos-stable, and we are not setting cgroup driver to systemd (on both kubelet as well as containerd), it shouldnt be working correctly right?
cc: @bobbypage
Signed-off-by: Akhil Mohan <makhil@vmware.com>
update VM images to use cos-stable for testing containerd branches 1.5 and 1.6 Signed-off-by: Akhil Mohan <makhil@vmware.com>
Signed-off-by: Akhil Mohan <makhil@vmware.com>
Signed-off-by: Akhil Mohan <makhil@vmware.com>
adc1455
to
98f2595
Compare
Signed-off-by: Akhil Mohan <makhil@vmware.com>
/lgtm |
Thanks for the updates! |
/assign @dims |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: akhilerm, dims 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 |
@akhilerm: Updated the
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. |
it looks like https://testgrid.k8s.io/sig-node-containerd#pull-node-e2e went red right around when these two PRs merged: |
The containerd test jobs are now using cos-stable image now; which has cgroupv2 enabled by default. Therefore we need to add systemd as cgroup driver for all the tests which makes use of cos-stable.
Ref : #27912 (comment)
Signed-off-by: Akhil Mohan makhil@vmware.com