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

Deprecation of cgroup v1 #3018

Closed
hitsub2 opened this issue Apr 14, 2023 · 5 comments
Closed

Deprecation of cgroup v1 #3018

hitsub2 opened this issue Apr 14, 2023 · 5 comments
Labels
status/blocked Issue is blocked waiting on something external type/support User support related issues.

Comments

@hitsub2
Copy link

hitsub2 commented Apr 14, 2023

As per disucssion #2874 Bottlerocket 1.13.0 moving to cgroup v2 for new variants, I just want to check out if there is any clear date for deprecation and remove of cgroup v1 in BR.

Why do I want to stay on cgroup v1?

According to the kubernetes annoucement, it is not ready for us to upgrade the JDK version.

If you deploy Java applications with the JDK, prefer to use JDK 11.0.16 and later or JDK 15 and later, which [fully support cgroup v2](https://bugs.openjdk.org/browse/JDK-8230305).
@hitsub2 hitsub2 added status/needs-triage Pending triage or re-evaluation type/enhancement New feature or request labels Apr 14, 2023
@markusboehme
Copy link
Member

There is no definitive date for removing cgroup v1 support in Bottlerocket yet. The latest -k8s variants defaulting to cgroup v1 are those targeting Kubernetes 1.25, which will be supported well into 2024, and we don't intend to change defaults for already released variants. Support for cgroup v1 may be removed in components Bottlerocket depends on before that date. An example of this is systemd which aims to remove it in the first release in 2024. We will have to deal with those changes within Bottlerocket as they appear, for systemd e.g. by using a systemd-stable release.

For your situation, I am assuming that you are running on JDK 8, is that right? Only the JDK versions 8, 11, 17, 20 are currently within their upstream support window and of those only JDK 8 does not currently support cgroup v2. Perusing the OpenJDK issue tracker, it looks like there is an OpenJDK 8 release coming (8u372) which will have support for cgroup v2 backported (main issue, backport issue, release notes). Extrapolating from the past release schedule OpenJDK 8u372 is likely to be released this month.

(After OpenJDK 8u372 is out, we'll want to make sure the Kubernetes docs get updated.)

@markusboehme markusboehme added status/blocked Issue is blocked waiting on something external type/support User support related issues. and removed type/enhancement New feature or request status/needs-triage Pending triage or re-evaluation labels Apr 17, 2023
@hitsub2
Copy link
Author

hitsub2 commented Apr 18, 2023

Thanks @markusboehme. So before remove cgroup v1 in Bottlerocket, it still has v1 and v2 in BR, right? We can choose to use v1 or v2 as follows? Variants for 1.26 is already default to v2, but we can still use v1 right?:

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

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

@markusboehme
Copy link
Member

Yes, that's right, Bottlerocket supports both cgroup v1 and cgroup v2. With Bottlerocket 1.13.0, only the defaults for new variants changed. You can still choose to use cgroup v1 with Bottlerocket variants for Kubernetes 1.26, though support for it will likely disappear together with the last variant that defaulted to it (i.e. when the Kubernetes 1.25 variants reach end of life). By then, the upcoming OpenJDK 8 release with cgroup v2 support will have removed the update blocker for workloads requiring JDK 8.

Please note that in the snippet you need to set "systemd.unified_cgroup_hierarchy" = ["0"] (i.e. 0 instead of 1) to use cgroup v1. This value is treated as a boolean rather than the cgroup version, with "unified cgroup hierarchy" being another common name for "cgroup v2".

@arnaldo2792
Copy link
Contributor

Closing for now since the question originally asked was answered.

@markusboehme
Copy link
Member

OpenJDK 8u372 with support for cgroup v2 has been released.

(After OpenJDK 8u372 is out, we'll want to make sure the Kubernetes docs get updated.)

kubernetes/website#40189

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/blocked Issue is blocked waiting on something external type/support User support related issues.
Projects
None yet
Development

No branches or pull requests

3 participants