Skip to content

Commit

Permalink
libpod, rootless: create cgroup for conmon
Browse files Browse the repository at this point in the history
always create a new cgroup for conmon also when running as rootless.
We were previously creating one only when necessary, but that behaves
differently than root containers.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
  • Loading branch information
giuseppe committed Oct 30, 2019
1 parent e7540d0 commit 78e2a31
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions libpod/oci_conmon_linux.go
Expand Up @@ -1220,14 +1220,6 @@ func (r *ConmonOCIRuntime) moveConmonToCgroupAndSignal(ctr *Container, cmd *exec
mustCreateCgroup = false
}

if rootless.IsRootless() {
ownsCgroup, err := cgroups.UserOwnsCurrentSystemdCgroup()
if err != nil {
return err
}
mustCreateCgroup = !ownsCgroup
}

if mustCreateCgroup {
cgroupParent := ctr.CgroupParent()
if r.cgroupManager == SystemdCgroupsManager {
Expand Down

0 comments on commit 78e2a31

Please sign in to comment.