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

Default to cgroup v2 for dev and k8s-1.26 variants #2875

Merged

Conversation

markusboehme
Copy link
Member

Issue number:

Closes #2843

Description of changes: Make the *-dev and *-k8s-1.26 variants use cgroup v2 by default.

Testing done:

  • Confirmed defaults on boot and fallback instructions (user data/apiclient) work as expected via inspection of /sys/fs/cgroup on the host.
  • Basic functional testing done with the aws-k8s-1.24 variant for availability of a working EKS cluster.
  • Would appreciate help with running the conformance tests on the *-k8s-1.26 variants!

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

Make systemd set up a cgroup v2 hierarchy on boot by default for the
development/-dev variants. The old default of using cgroup v1 may still
be achieved via a setting applied using `apiclient`

    apiclient set -j '{"settings": {"boot": {"init": {"systemd.unified_cgroup_hierarchy": ["0"]}}}}'

or via user data:

    [settings.boot]
    reboot-to-reconcile = true

    [settings.boot.init]
    "systemd.unified_cgroup_hierarchy" = ["0"]

Signed-off-by: Markus Boehme <[email protected]>
Make systemd set up a cgroup v2 hierarchy on boot by default for the k8s-1.26
variants. The old behavior of using cgroup v1 may still be achieved via a
setting applied using `apiclient`

    apiclient set -j '{"settings": {"boot": {"init": {"systemd.unified_cgroup_hierarchy": ["0"]}}}}'

or via user data:

    [settings.boot]
    reboot-to-reconcile = true

    [settings.boot.init]
    "systemd.unified_cgroup_hierarchy" = ["0"]

Signed-off-by: Markus Boehme <[email protected]>
@markusboehme markusboehme changed the title Feature/default to cgroup v2 Default to cgroup v2 for dev and k8s-1.26 variants Mar 9, 2023
Copy link
Contributor

@stmcginnis stmcginnis left a comment

Choose a reason for hiding this comment

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

Looks good, assuming conformance testing passes.

@gthao313
Copy link
Member

gthao313 commented Mar 9, 2023

Running the conformance tests now. The code LGTM.

Copy link
Contributor

@jpmcb jpmcb left a comment

Choose a reason for hiding this comment

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

🍂

Copy link
Contributor

@zmrow zmrow left a comment

Choose a reason for hiding this comment

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

🏐

@gthao313
Copy link
Member

gthao313 commented Mar 10, 2023

aws-*-126

sonobuoy results $results
Plugin: e2e
Status: passed
Total: 7072
Passed: 371
Failed: 0

vmware-*-126

sonobuoy results $results
Plugin: e2e
Status: passed
Total: 7072
Passed: 362
Failed: 0

metal-*-126

Sonobuoy has completed. Use `sonobuoy retrieve` to get results.
Plugin: e2e
Status: passed
Total: 7069
Passed: 365
Failed: 0
Skipped: 6704

@markusboehme
Copy link
Member Author

Thank you Tianhao!

@markusboehme markusboehme merged commit 24e7574 into bottlerocket-os:develop Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support and use cgroup v2
6 participants