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

Add minimal systemd version about configuring cgroup driver docs #44979

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ cgroup driver instead of `cgroupfs`.

### systemd cgroup driver {#systemd-cgroup-driver}

{{< note >}}
The minimum `systemd` version should be v228 and above, see [details](https://github.com/systemd/systemd/commit/17f62e9bd00f5fefd486475861b06d3ec6b7ee10)
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @pegasas, can we make it a bit new-user friendly also, like adding a document what changes are being introduced in systemD.

Copy link
Contributor Author

@pegasas pegasas Feb 6, 2024

Choose a reason for hiding this comment

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

I can not really get your point.

  • If you are talking we should add some description about how systemd cgroup driver integrated into CRI, it would a large topic which deserves another issue for tracking.

  • If you are talking which specific change are introduced by systemd v228, I think it is unneccsary, assume if you are a user, what I concern is how I could use this function as soon as possible. If indeed the customer has such kinds of demands, he/she will looks deep into source code just like the discussions on issues.

Copy link
Contributor

@utkarsh-singh1 utkarsh-singh1 Feb 13, 2024

Choose a reason for hiding this comment

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

@pegasas, thanks for the clarity, was talking about any discussion before/after about this commit you have mentioned, if there are any?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, actually.
What are your suggestion?
maybe you're talking #1?

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with @utkarsh-singh1 here. Not everyone can understand the code and a purpose of certain code change. How about pointing to the systemd release notes ?

Here is how the change is explained there:

Slice units may now be created transiently via the bus APIs,
similar to the way service and scope units may already be
created transiently.

This is also requires some background for understanding, but it's much better than pointing to the code in my opinion.

Copy link
Contributor

Choose a reason for hiding this comment

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

@pegasas I would recommend linking to the systemd release notes or the releases page than pointing to the actual code. Also, a small nit

Suggested change
The minimum `systemd` version should be v228 and above, see [details](https://github.com/systemd/systemd/commit/17f62e9bd00f5fefd486475861b06d3ec6b7ee10)
The minimum `systemd` version should be v228 or above, see [details](https://github.com/systemd/systemd/releases/tag/v228)

Copy link
Contributor

Choose a reason for hiding this comment

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

May be some explanations should be added to clarify why the change is important for Kubernetes, wdyt?

Copy link
Contributor

Choose a reason for hiding this comment

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

Stating the required version should be sufficient IMO. What are some examples of the the explanations you'd like to see?

Copy link
Contributor

Choose a reason for hiding this comment

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

I simply want to know why v228 is a minimum required version.
Here is an example: https://kubernetes.io/docs/concepts/architecture/cgroups/#using-cgroupv2
That documentation not just recommends certain software versions, but gives enough info for a reader to understand a reasoning behind it, e.g. CRI-O >= v1.20 and Containerd >= v1.4 support cgroup2.

Copy link
Contributor

Choose a reason for hiding this comment

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

That's a good point. AFAIK the minimum required version is v228 per the linked issue because the kubelet fails to start with lower versions.

Copy link
Contributor

@network-charles network-charles Oct 3, 2024

Choose a reason for hiding this comment

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

Explained why this version is important. I also pointed to the version release note as it is easier to understand than reading code written in C.

Suggested change
The minimum `systemd` version should be v228 and above, see [details](https://github.com/systemd/systemd/commit/17f62e9bd00f5fefd486475861b06d3ec6b7ee10)
To use the systemd cgroup driver, `systemd` should be version 228 or later.
Before v228, systemd wasn’t good at handling transient units for slices. Normally, systemd would statically load this from a file, so this caused problems when Kubernetes tried to create slices dynamically.
See [systemd v228 release notes](https://github.com/systemd/systemd/blob/v228/NEWS).

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd write:

To use the systemd cgroup driver, `systemd` should be version 228 or later.

(mentioning “minimum” is tautological).

The rest of the change looks good. However, I'd move the entire note to come after we introduce systemd.

Copy link
Contributor

Choose a reason for hiding this comment

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

Alright

{{< /note >}}

When [systemd](https://www.freedesktop.org/wiki/Software/systemd/) is chosen as the init
system for a Linux distribution, the init process generates and consumes a root control group
(`cgroup`) and acts as a cgroup manager.
Expand Down