-
Notifications
You must be signed in to change notification settings - Fork 268
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
Containerd SystemdCgroup configuration #4085
Comments
What distro and release are you on, and what version of systemd does it have? Older versions didn't support cpuset cgroup delegation, and were not suitable for use as the cgroup driver. Ref: https://github.com/opencontainers/runc/blob/main/docs/cgroup-v2.md#systemd |
|
Yes, that's too old and should not be used as per the runc documentation I linked above. |
I get you - but - we don't always have control over these things. Are you saying that using systemd as the cgroup driver on this version of systemd for kubelet and containerd running under the RKE2 system service doesn't work? Or doesn't have the intended effect? (I'm out of my depth wrt cpuset delegation - I was taking the containerd guidance as gold source...) |
Upstream docs also encourage you to move to cgroup v2 but I'm pretty sure el7 doesn't support that, does it? You're on a very old OS, a lot of the guidance you'll find out there won't be relevant until you go to a newer distro release with modern cgroups and systemd versions. |
Thanks |
Is your feature request related to a problem? Please describe.
This relates to #3106. That issue was closed in favor of this PR for
systemd
version >= 244.However, for those running on older
systemd
versions, this guidance pretty clearly states that not using systemd consistently as the cgroup driver is a potential stability issue.We can customize the kubelet configuration by specifying
kubelet-arg: --cgroup-driver=systemd
in the rke2 config file. But to get this configuration into the containerd toml we have to place a complete.toml.tmpl
file into the /var/lib/rancher/rke2/agent/etc/containerd/ directory, according to this. This means we have to generate this file ourselves. This file contains selinux interpolation from the rke2 config file and registry mirror configuration from theregistries.yaml
. It is extremely awkward to have to do all this templating ourselves - to build a correct .toml.tmpl file - just to getSystemdCgroup = true
in there.It seems much more natural to provide the ability for the rke2 config to accept something like
cgroup-driver: [cgroupfs | systemd]
and then use that to consistently configure the kubelet and containerd.Describe the solution you'd like
Provide the ability for the rke2 config to accept something like
cgroup-driver: [cgroupfs | systemd]
and then use that to consistently configure the kubelet and containerd. Or since you already support the kubelet config, maybecontainerd-systemd-cgroup-enabled
or something like that.Describe alternatives you've considered
SystemdCgroup = true
, and selinux configured redundantly with what is in the rke2 config and the registry mirrors configured redundantly with what is in the registries.yaml. Build this file using Ansible jinja templating using the template embedded in the k3s go code.The text was updated successfully, but these errors were encountered: