Merge pull request #868 from giuseppe/cgroup-pids-no-create-root

cgroups: do not create $ROOT/pids on cgroupv2
This commit is contained in:
OpenShift Merge Robot 2021-12-23 14:06:09 +01:00 committed by GitHub
commit 3c0516757c
1 changed files with 3 additions and 0 deletions

View File

@ -34,6 +34,9 @@ func (c *pidHandler) Apply(ctr *CgroupControl, res *spec.LinuxResources) error {
// Create the cgroup
func (c *pidHandler) Create(ctr *CgroupControl) (bool, error) {
if ctr.cgroup2 {
return false, nil
}
return ctr.createCgroupDirectory(Pids)
}