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

🌱 test/e2e: pin cgroupDriver to cgroupfs #4614

Merged

Conversation

sbueringer
Copy link
Member

@sbueringer sbueringer commented May 13, 2021

Starting with kind v0.11, kind images will have cgroup-root=/kubelet
hard-coded to fix an issue with nested cgroup hierarchies. The hierarchy
below /kubelet is not compatible with systemd cgroupfs (in contrast to
/).
Starting with kubeadm v1.21, kubeadm will default to cgroupDriver
systemd.

Thus, the combination of images from kind >=v0.11 and kubeadm >=v1.21 are
not compatible. To solve this problem we will pin cgroupDriver to cgroupfs
until kind supports the systemd hierarchy with the /kubelet cgroup-root.

What this PR does / why we need it:

Preparation to be compatible with the upcoming newly published kind images. Somewhat related to: #4469

xref:

Not sure if it's 🌱 or ⚠️ because the breaking change is comes from kind and not from this PR.

I hope the description is enough context. I tried to summarize it as compact as possible. Let me know if I should provide more context as Slack and the Google Doc are not really persistent documentation.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 13, 2021
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 13, 2021
@sbueringer
Copy link
Member Author

/test pull-cluster-api-e2e-full-main
/test pull-cluster-api-e2e-workload-upgrade-1-21-latest-main

/cc @vincepri @elmiko @fabriziopandini

@vincepri
Copy link
Member

Can we add a comment inline to the cgroup driver and link to the issue?

@sbueringer
Copy link
Member Author

sbueringer commented May 13, 2021

Can we add a comment inline to the cgroup driver and link to the issue?

Yes, which one of those? :)

I think the most comprehensive summary of the issue is probably this PR. Or do you mean something like the following?

# We have to pin the cgroupDriver to cgroupfs as kubeadm >=1.21 defaults to systemd
# kind will implement systemd support in: https://github.com/kubernetes-sigs/kind/issues/1726" 

Copy link
Contributor

@elmiko elmiko left a comment

Choose a reason for hiding this comment

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

this generally looks good to me.

i realize this is out of scope for this PR, but i am curious about the notion that these flags are being deprecated[0], do we have an issue around changing our kubeadm implementation to create the config file (or does it do that already)?

[0] https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/#options

@vincepri
Copy link
Member

@sbueringer Yes, something inlined with the yaml so we don't forget later

@neolit123
Copy link
Member

/lgtm
everything on top of kubeadm should use the systemd driver eventually.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 13, 2021
@sbueringer sbueringer force-pushed the pr-capd-pin-cgroupfs branch from 3456a4b to 42f93d8 Compare May 13, 2021 20:14
@sbueringer
Copy link
Member Author

/test pull-cluster-api-e2e-full-main
/test pull-cluster-api-e2e-workload-upgrade-1-21-latest-main

@sbueringer
Copy link
Member Author

sbueringer commented May 13, 2021

@vincepri I can additionally create an issue which tracks the upstream kind issue to change the cgroupDriver back to systemd. WDYT?

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 13, 2021
@sbueringer
Copy link
Member Author

/test pull-cluster-api-e2e-full-main
/test pull-cluster-api-e2e-workload-upgrade-1-21-latest-main

@sbueringer
Copy link
Member Author

I'll look into the failed test later today

@sbueringer
Copy link
Member Author

sbueringer commented May 14, 2021

@vincepri @fabriziopandini

  • good news: it's not related to this PR
  • bad news: it's not related to this PR

Same issue on the main branch: https://testgrid.k8s.io/sig-cluster-lifecycle-cluster-api#capi-e2e-main-1-21-latest

I'm currently debugging it locally and depending on how easy the fix is either open an issue or open another PR. But i think there's no reason to block the current PR because of that.

@vincepri
Copy link
Member

Should we merge this and tackle that separately?

@sbueringer
Copy link
Member Author

sbueringer commented May 14, 2021

@vincepri I would definitely tackle it separately, but let's wait for @fabriziopandini 's review (which was probably your plan anyway)

@sbueringer
Copy link
Member Author

@vincepri @fabriziopandini more details in: #4619

Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

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

@sbueringer changes looks ok to me
Could you kindly change also templates under /test/infrastructure/docker/examples ?

Starting with kind v0.11, kind images will have cgroup-root=/kubelet
hard-coded to fix an issue with nested cgroup hierarchies. The hierarchy
below /kubelet is not compatible with systemd cgroupfs (in contrast to
/).
Starting with kubeadm v1.21, kubeadm will default to cgroupDriver
systemd.

Thus, the combination of images from kind >=v0.11 and kubeadm >=v1.21 are
not compatible. To solve this problem we will pin cgroupDriver to cgroupfs
until kind supports the systemd hierarchy with the /kubelet cgroup-root.
@sbueringer sbueringer force-pushed the pr-capd-pin-cgroupfs branch from 42f93d8 to 972c45c Compare May 14, 2021 17:51
@sbueringer
Copy link
Member Author

sbueringer commented May 14, 2021

@fabriziopandini of course, done. I now have 47 occurrences of both eviction-hard and cgroup-driver below test/* (locally, including rendered templates). We have to also ensure that we don't miss this on the ipv6 PR
/cc @mcwumbly

@k8s-ci-robot
Copy link
Contributor

@sbueringer: GitHub didn't allow me to request PR reviews from the following users: mcwumbly.

Note that only kubernetes-sigs members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

@fabriziopandini of course, done. I now have 47 occurrences of both eviction-hard and cgroup-driver below test/*. We have to also ensure that we don't miss this on the ipv6 PR
/cc @mcwumbly

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.

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented May 14, 2021

@sbueringer: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-cluster-api-e2e-workload-upgrade-1-21-latest-main 42f93d8 link /test pull-cluster-api-e2e-workload-upgrade-1-21-latest-main

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@sbueringer
Copy link
Member Author

/retest

@fabriziopandini
Copy link
Member

/approve
/lgtm

47 occurrences of both eviction-hard and cgroup-driver below test/*

Might be kustomize can help here, but this could be tackled in a follow up PR.

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 14, 2021
@k8s-ci-robot k8s-ci-robot merged commit 799da05 into kubernetes-sigs:master May 14, 2021
@k8s-ci-robot k8s-ci-robot added this to the v0.4 milestone May 14, 2021
@sbueringer
Copy link
Member Author

sbueringer commented May 14, 2021

/approve
/lgtm

47 occurrences of both eviction-hard and cgroup-driver below test/*

Might be kustomize can help here, but this could be tackled in a follow up PR.

@fabriziopandini that comment was mostly about that I think I know found all of the relevant occurrences :)

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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

6 participants