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

kinder: pin the CR cgroup driver to "systemd" #2495

Merged

Conversation

neolit123
Copy link
Member

@neolit123 neolit123 commented May 31, 2021

Pin the driver to "systemd" in:

  • the Docker / containerd config files during image alter
  • KubeletConfiguration that kubeadm deploys

xref #874

@neolit123 neolit123 added priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. kind/feature Categorizes issue or PR as related to a new feature. area/kinder Issues to track work in the kinder tool labels May 31, 2021
@neolit123 neolit123 added this to the v1.22 milestone May 31, 2021
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 31, 2021
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 31, 2021
@neolit123
Copy link
Member Author

neolit123 commented May 31, 2021

/cc @fabriziopandini @pacoxu

after merging kubernetes/kubernetes#99647 and without this the CI would / can fail.
dockershim will fail on driver detection, while for containerd it "might" fail with unexpected results due to mixed cgroup trees.

EDIT: i tested both the docker and containerd images locally.

@neolit123
Copy link
Member Author

/retest

Pin the driver to "systemd" in:
- the Docker / containerd config files during image alter
- KubeletConfiguration that kubeadm deploys
@neolit123 neolit123 force-pushed the 1.22-pin-cgroup-driver-in-kinder branch from 165aaae to 920dc0e Compare May 31, 2021 20:27
Comment on lines +50 to +62
// Workaround from https://github.com/kubernetes/kubernetes/issues/43704#issuecomment-289484654
// Using the systemd driver in our rather old base image results in errors around the kubepods.slice.
// Write the flags --cgroups-per-qos=false --enforce-node-allocatable="" in the KUBELET_EXTRA_ARGS file.
//
// It's not possible to pass these via the KubeletConfiguration because the validation / defaulting is bogus.
// Empty slice gets defaulted to "pods" and non-empty slice fails for 'cgroupsPerQOS: false' -
// i.e. it is not possible to pass 'none' or '[]' for the 'enforceNodeAllocatable' config field.
// https://github.com/kubernetes/kubernetes/blob/ea0764452222146c47ec826977f49d7001b0ea8c/pkg/kubelet/apis/config/validation/validation.go#L53-L54
if err := bc.RunInContainer("bash", "-c",
"printf 'KUBELET_EXTRA_ARGS=\"--cgroups-per-qos=false --enforce-node-allocatable=\"\"\"' > /etc/default/kubelet",
); err != nil {
return errors.Wrap(err, "could not write /etc/default/kubelet")
}
Copy link
Member Author

Choose a reason for hiding this comment

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

debugging this was a lot of "fun".

@fabriziopandini
Copy link
Member

/lgtm
To restore CI signal to green

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 1, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini, neolit123

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 merged commit 47c0def into kubernetes:master Jun 1, 2021
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/kinder Issues to track work in the kinder tool cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants