summaryrefslogtreecommitdiff
path: root/pkg/cgroups/cpu.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2019-07-08 10:16:13 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-07-10 10:54:35 +0200
commitbbe03e61a375416180432fbd9d00d23a7c2a4714 (patch)
tree959eb8a850da9f9ba10d5e0cfb0fe213d20c4fdb /pkg/cgroups/cpu.go
parent551edd287e7cb31327d18c3ebc0d2e6b1160c235 (diff)
downloadpodman-bbe03e61a375416180432fbd9d00d23a7c2a4714.tar.gz
podman-bbe03e61a375416180432fbd9d00d23a7c2a4714.tar.bz2
podman-bbe03e61a375416180432fbd9d00d23a7c2a4714.zip
cgroups: support creating cgroupsv2 paths
drop the limitation of not supporting creating new cgroups v2 paths. Every controller enabled /sys/fs/cgroup will be propagated down to the created path. This won't work for rootless cgroupsv2, but it is not an issue for now, as this code is used only by CRI-O. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'pkg/cgroups/cpu.go')
-rw-r--r--pkg/cgroups/cpu.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/cgroups/cpu.go b/pkg/cgroups/cpu.go
index 8640d490e..c9325946b 100644
--- a/pkg/cgroups/cpu.go
+++ b/pkg/cgroups/cpu.go
@@ -61,7 +61,7 @@ func (c *cpuHandler) Apply(ctr *CgroupControl, res *spec.LinuxResources) error {
// Create the cgroup
func (c *cpuHandler) Create(ctr *CgroupControl) (bool, error) {
if ctr.cgroup2 {
- return false, fmt.Errorf("cpu create not implemented for cgroup v2")
+ return false, nil
}
return ctr.createCgroupDirectory(CPU)
}