Skip to content

Commit

Permalink
Disable adding CGroup path to OCI spec for NoCgroups
Browse files Browse the repository at this point in the history
It's not going to be used anyways, so don't bother including it.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
  • Loading branch information
mheon committed Aug 26, 2019
1 parent 3e35154 commit e9ef398
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libpod/container_internal_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ func (c *Container) generateSpec(ctx context.Context) (*spec.Spec, error) {
if err != nil {
return nil, err
}
if rootless.IsRootless() && !unified {
if (rootless.IsRootless() && !unified) || c.config.NoCgroups {
g.SetLinuxCgroupsPath("")
} else if c.runtime.config.CgroupManager == SystemdCgroupsManager {
// When runc is set to use Systemd as a cgroup manager, it
Expand Down

0 comments on commit e9ef398

Please sign in to comment.