-
Notifications
You must be signed in to change notification settings - Fork 377
libcrun/cgroup: always enable TasksAccounting for systemd #1901
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
libcrun/cgroup: always enable TasksAccounting for systemd #1901
Conversation
When using systemd cgroup driver with cgroup v2, unconditionally enable TasksAccounting. This ensures the pids controller is available even when no explicit pids resource limit is configured. Without this, container managers like CRI-O cannot read pids.current from the cgroup, resulting in ProcessCount being reported as 0 for pod sandboxes. This causes Kubernetes Summary API conformance tests to fail. The issue manifests specifically with pause/infra containers which typically do not have pids limits configured, leading to TasksAccounting not being enabled in the systemd scope properties. Fixes: cri-o/cri-o#9536 Signed-off-by: Sohan Kunkerkar <[email protected]>
Reviewer's guide (collapsed on small PRs)Reviewer's GuideIn the systemd cgroup driver code for cgroup v2, TasksAccounting is now enabled unconditionally—removing the old guard and adding an explanatory comment—so that the pids controller is always active and CRI-O can correctly report pids.current as runc does. File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
flouthoc
left a comment
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.
LGTM
giuseppe
left a comment
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.
LGTM
When using systemd cgroup driver with cgroup v2, unconditionally enable TasksAccounting. This ensures the pids controller is available even when no explicit pids resource limit is configured.
Without this, CRI-O cannot read pids.current from the cgroup, resulting in ProcessCount being reported as 0 for pod sandboxes. This causes Kubernetes Summary API conformance tests to fail.
The issue manifests specifically with pause/infra containers which typically do not have pids limits configured, leading to TasksAccounting not being enabled in the systemd scope properties.
This behavior matches what runc has been doing for a long time, where it unconditionally enables
TasksAccountingfor cgroup v2.Fixes: cri-o/cri-o#9536
Summary by Sourcery
Unconditionally enable TasksAccounting in systemd cgroup v2 scopes to ensure the pids controller is available and fix ProcessCount reporting in CRI-O.
Bug Fixes:
Enhancements: