-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
kubernetes: fix startup by setting systemd as cgroup driver #111590
Conversation
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 don't know if this is difficult, but could we have a test for those cases 🤔 ?
There is a test for kubernetes. I am sure it broke in the process. |
We could add the kubernetes test to docker.pussthru.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.
I can confirm this fixes the kubernetes NixOS 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.
Seems like the right fix because it also improves stability according to the docs, but does require instructions in the release notes, because of the following:
Changing the cgroup driver of a Node that has joined a cluster is strongly not recommended.
If the kubelet has created Pods using the semantics of one cgroup driver, changing the container runtime to another cgroup driver can cause errors when trying to re-create the Pod sandbox for such existing Pods. Restarting the kubelet may not solve such errors.
If you have automation that makes it feasible, replace the node with another using the updated configuration, or reinstall it using automation.
-- https://kubernetes.io/docs/setup/production-environment/container-runtimes/#cgroup-drivers
Good point, I didn't know there was state related to the cgroup backend used. We could decide the default behavior based on the stateVersion in the module and set the system to use the old cgroup API if it's an old stateVersion. |
Not sure when I get back to this. When somebody else beat me to write the release notes I will cherry-pick from there. |
Closing this for now for someone else to pick up. |
Motivation for this change
#108960 (comment)
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)