-
Notifications
You must be signed in to change notification settings - Fork 524
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
Use runtime.slice and system.slice cgroup settings in k8s variants #1684
Conversation
The one outstanding "problem" is that the slice/group directory is not created under every controller. For example under When using
This is due to the fact that it doesn't find the cgroup under |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://www.freedesktop.org/software/systemd/man/systemd.special.html
slices.target
A special target unit that sets up all slice units (see systemd.slice(5) for details) that shall always be active after boot. By default the generic system.slice slice unit as well as the root slice unit -.slice are pulled in and ordered before this unit (see below).
Adding slice units to slices.target is generally not necessary. Instead, when some unit that uses Slice= is started, the specified slice will be started automatically. Adding WantedBy=slices.target lines to the [Install] section should only be done for units that need to be always active. In that case care needs to be taken to avoid creating a loop through the automatic dependencies on "parent" slices.
So I removed the slice from After and Wants.
@bcressey This is the only outstanding issue I have. Currently I don't believe Bottlerocket allows setting (nor sets) the In my AMI for FedoraCoreOS I created a runtime.service that simply created the directories and that runtime.slice required. But I have to assume there is a more correct way to do that. |
systemd doesn't manage
|
Checks for the existence of the controllers |
@samuelkarp Would like to get this reviewed so can be included in next release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a small concern with the effects this change will have on the aws-ecs-1
variant, since Amazon ECS does not expect containerd to be in a separate cgroup. However, because none of the cgroup settings (other than the hierarchy) are changed, the only effect should be in passive hierarchy-related behavioral differences (for example, CPU share weights under contention). I think it's reasonable to take this change, and if we end up deciding that we should treat ECS differently later we can always do so.
LGTM
Issue number:
#1681
Description of changes:
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.