diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-05-12 12:38:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-12 12:38:33 -0700 |
commit | 2cacad0f7b1746817736e18e71af739330652499 (patch) | |
tree | 1fdb0490889eb64b18559b7ce96aad79b87dc630 | |
parent | 1b3dc66e73f97c9f10b3bf203c82556b27a3539c (diff) | |
parent | 0c81e2256c76179e18f7bcfb6fd597579fbee2bb (diff) | |
download | podman-2cacad0f7b1746817736e18e71af739330652499.tar.gz podman-2cacad0f7b1746817736e18e71af739330652499.tar.bz2 podman-2cacad0f7b1746817736e18e71af739330652499.zip |
Merge pull request #6198 from haircommander/skip-unified-1.9
[1.9] 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) |