Skip to content

Commit

Permalink
rootless: Fix cgroup creation logic for rootless
Browse files Browse the repository at this point in the history
We do not want to create cgroups in case of rootless.
Fix the logic to implement this.

Fixes kata-containers#2177

Signed-off-by: Archana Shinde <[email protected]>
  • Loading branch information
amshinde committed Nov 9, 2019
1 parent d0615f8 commit f6ffb79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion virtcontainers/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ func (c *Container) create() (err error) {
}
c.process = *process

if !c.sandbox.config.SandboxCgroupOnly || !rootless.IsRootless() {
if !rootless.IsRootless() && !c.sandbox.config.SandboxCgroupOnly {
if err = c.cgroupsCreate(); err != nil {
return
}
Expand Down

0 comments on commit f6ffb79

Please sign in to comment.