diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-05-13 03:23:11 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-13 03:23:11 -0700 |
commit | d147b3ee027580dd7afdeb0fa04d990ae1d2ee91 (patch) | |
tree | 823c8ed9142da8004d7cd4611b7a29f56fc31ac3 | |
parent | c46ba9905fd7749e6a1f1b1359315bfc73085276 (diff) | |
parent | f4b59c74a799a27d74ea23aca4e61df787b80647 (diff) | |
download | podman-d147b3ee027580dd7afdeb0fa04d990ae1d2ee91.tar.gz podman-d147b3ee027580dd7afdeb0fa04d990ae1d2ee91.tar.bz2 podman-d147b3ee027580dd7afdeb0fa04d990ae1d2ee91.zip |
Merge pull request #6200 from haircommander/skip-unified
cgroup: skip unified if we are using v1
-rw-r--r-- | pkg/cgroups/cgroups.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/cgroups/cgroups.go b/pkg/cgroups/cgroups.go index d51905f4b..3b56f944f 100644 --- a/pkg/cgroups/cgroups.go +++ b/pkg/cgroups/cgroups.go @@ -517,6 +517,10 @@ func (c *CgroupControl) AddPid(pid int) error { } for _, n := range names { + // If we aren't using cgroup2, we won't write correctly to unified hierarchy + if !c.cgroup2 && n == "unified" { + continue + } p := filepath.Join(c.getCgroupv1Path(n), "tasks") if err := ioutil.WriteFile(p, pidString, 0644); err != nil { return errors.Wrapf(err, "write %s", p) |