summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-05-13 03:23:11 -0700
committerGitHub <noreply@github.com>2020-05-13 03:23:11 -0700
commitd147b3ee027580dd7afdeb0fa04d990ae1d2ee91 (patch)
tree823c8ed9142da8004d7cd4611b7a29f56fc31ac3 /pkg
parentc46ba9905fd7749e6a1f1b1359315bfc73085276 (diff)
parentf4b59c74a799a27d74ea23aca4e61df787b80647 (diff)
downloadpodman-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
Diffstat (limited to 'pkg')
-rw-r--r--pkg/cgroups/cgroups.go4
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)