diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-10-13 20:55:38 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-10-13 20:55:38 +0000 |
commit | fb942f9b83a1d3d2f547f2f318919eaddb5f21ee (patch) | |
tree | 3cf8750589b05ba39eb6cf8f759120f5f193579f | |
parent | 13da34691ce0b5056c00213b80a52b0ba33d55f2 (diff) | |
parent | 82218937948bd59f8d20e44575405874d56f0ae7 (diff) |
Merge release-20210927.0-69-g822189379 (automated)
-rw-r--r-- | runsc/container/container.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/runsc/container/container.go b/runsc/container/container.go index 6a59df411..77a0f7eba 100644 --- a/runsc/container/container.go +++ b/runsc/container/container.go @@ -1278,7 +1278,10 @@ func (c *Container) setupCgroupForSubcontainer(conf *config.Config, spec *specs. // no cgroups was configured. func cgroupInstall(conf *config.Config, cg *cgroup.Cgroup, res *specs.LinuxResources) (*cgroup.Cgroup, error) { // TODO(gvisor.dev/issue/3481): Remove when cgroups v2 is supported. - if !conf.Rootless && cgroup.IsOnlyV2() { + if cgroup.IsOnlyV2() { + if conf.Rootless { + return nil, nil + } return nil, fmt.Errorf("cgroups V2 is not yet supported. Enable cgroups V1 and retry") } if err := cg.Install(res); err != nil { |