cri-resource-manager
cri-resource-manager copied to clipboard
Implement autodetection of cgroupv2 and proper container resource control using cgroupv2.
Describe the bug
cri-resmgr fails to properly adjust resources in container creation/update requests, if the node is using cgroup v2.
Expected behavior
cri-resmgr autodetects if cgroup v2 is in use and properly adjusts itself to control resources using entries in the unified cgroupv2 CRI resource field.
To Reproduce
- Enable a cgroup v2 on a node
- Configure kubelet using cri-resmgr as the CRI runtime, and for instance topology-aware policy
- Create a burstable or a guaranteed container.
- Observe the logs about where/to which CPUs cri-resmgr assigns containers.
- Observe actual pinning, or to be precise the lack of thereof. Containers are running on all CPUs.
Environment
Should not matter, as long as the kernel, the real runtime and kubelet are all cgroupv2 aware.