Skip to content

cgroup: add podruntime.slice to recognized systemd slices#287

Merged
def merged 1 commit intocoroot:mainfrom
Alegrowin:fix/podruntime-slice-cgroup
Mar 3, 2026
Merged

cgroup: add podruntime.slice to recognized systemd slices#287
def merged 1 commit intocoroot:mainfrom
Alegrowin:fix/podruntime-slice-cgroup

Conversation

@Alegrowin
Copy link
Contributor

Summary

Adds podruntime.slice to the systemd slice regex and prefix switch in containerByCgroup(), following the same pattern as #264 (which added kube.slice and azure.slice).

Without this fix, clusters using kubeReservedCgroup: /podruntime.slice log hundreds of warnings per scrape cycle:

W0303 - registry.go:334] failed to read proc cgroup: unknown container: /podruntime.slice/kubelet.service

Context

/podruntime.slice is the upstream Kubernetes recommended name for kube-reserved-cgroup. It is used by OVHcloud MKS and other distributions that follow the Node Allocatable design proposal. Kubelet and containerd are placed under this slice via systemd Slice=podruntime.slice.

Changes

  • cgroup.go: Add podruntime to systemSliceIdRegexp and add podruntime.slice to the prefix case
  • cgroup_test.go: Add test cases for /podruntime.slice/containerd.service and /podruntime.slice/kubelet.service

@def
Copy link
Member

def commented Mar 3, 2026

@Alegrowin thank you!

@def def merged commit 9e229ea into coroot:main Mar 3, 2026
1 check passed
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.

2 participants