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

Make cgroup_driver default to systemd #631

Merged
merged 2 commits into from Jun 5, 2023
Merged

Make cgroup_driver default to systemd #631

merged 2 commits into from Jun 5, 2023

Conversation

r-tierney
Copy link
Contributor

@r-tierney r-tierney commented May 17, 2023

As per prior discussion within this PR I've made systemd the default cgroup_driver for the next major release or when ready.
#625
#625 (comment)

TLDR;
The default cgroup_driver for kubelet is systemd, however the default within this module for containerd is set to cgroupfs which causes a conflict between containerd & kubelet leading to kubelet crashlooping. This PR is to set the default cgroup_driver for containerd to systemd as recommended by the kubernetes team Kubernetes Docs for this
Tested on Debian bullseye & bookworm.

There are still a few files which have this set to cgroupfs as seen here:

ryant@Ryans-MacBook-Air:~/puppetlabs-kubernetes on  systemd_cgroup_driver_default took 2s ❯ grep -r cgroupfs
spec/classes/packages_spec.rb:      'docker_cgroup_driver' => 'cgroupfs',
spec/classes/packages_spec.rb:    it { is_expected.to contain_file('/etc/docker/daemon.json').with_content(%r{\s*"native.cgroupdriver=cgroupfs"\s*}) }
spec/spec_helper_acceptance_local.rb:      cgroup_driver => 'cgroupfs',
spec/spec_helper_acceptance_local.rb:      cgroup_driver => 'cgroupfs',
spec/spec_helper_acceptance_local.rb:      cgroup_driver => 'cgroupfs',
spec/acceptance/kubernetes_spec.rb:              cgroup_driver => 'cgroupfs',
ryant@Ryans-MacBook-Air:~/puppetlabs-kubernetes on  systemd_cgroup_driver_default ❯

@r-tierney r-tierney requested a review from a team as a code owner May 17, 2023 15:02
@puppet-community-rangefinder
Copy link

kubernetes::config::kubeadm is a class

that may have no external impact to Forge modules.

kubernetes::config::worker is a class

that may have no external impact to Forge modules.

kubernetes is a class

Breaking changes to this file MAY impact these 5 modules (near match):

kubernetes::packages is a class

that may have no external impact to Forge modules.

This module is declared in 0 of 580 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

@jordanbreen28
Copy link
Contributor

jordanbreen28 commented May 17, 2023

@r-tierney that was fast!
I think if we are going to default to systemd we should update the test cases you linked in your original comment to use this driver too. Means we can spot any potential issues using the CI.

@r-tierney
Copy link
Contributor Author

@r-tierney that was fast! I think if we are going to default to systemd we should update the test cases you linked in your original comment to use this driver too. Means we can spot any potential issues using the CI.

Sure thing, thats updated in my latest commit

Here is whats left as i haven't dug into the docker_cgroup_driver so left that unchanged:

ryant@Ryans-MacBook-Air:~/puppetlabs-kubernetes on  systemd_cgroup_driver_default took 3s ❯ grep -r cgroupfs
spec/classes/packages_spec.rb:      'docker_cgroup_driver' => 'cgroupfs',
spec/classes/packages_spec.rb:    it { is_expected.to contain_file('/etc/docker/daemon.json').with_content(%r{\s*"native.cgroupdriver=cgroupfs"\s*}) }
ryant@Ryans-MacBook-Air:~/puppetlabs-kubernetes on  systemd_cgroup_driver_default ❯

@david22swan
Copy link
Member

Will merge in and release alongside: #633

@david22swan david22swan merged commit ef68246 into puppetlabs:main Jun 5, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants