diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-09-20 09:05:43 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-20 09:05:43 -0400 |
commit | b906ecbb5bc887f5123a0f61a5a51782aa34357f (patch) | |
tree | a13a8cbec90889361c8dc14f5d4ecf2dbb01fce9 /utils/utils_supported.go | |
parent | ddb384451147c4ef9d0307be0cc8dbad6d94970c (diff) | |
parent | eea5d251267d070d7920008056e3e4d603cae204 (diff) | |
download | podman-b906ecbb5bc887f5123a0f61a5a51782aa34357f.tar.gz podman-b906ecbb5bc887f5123a0f61a5a51782aa34357f.tar.bz2 podman-b906ecbb5bc887f5123a0f61a5a51782aa34357f.zip |
Merge pull request #11648 from giuseppe/raise-move-process-to-scope-only-with-cgroupv2
utils: raise warning only on cgroupv2
Diffstat (limited to 'utils/utils_supported.go')
-rw-r--r-- | utils/utils_supported.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/utils_supported.go b/utils/utils_supported.go index ebc870d26..1404e3194 100644 --- a/utils/utils_supported.go +++ b/utils/utils_supported.go @@ -47,10 +47,10 @@ func RunUnderSystemdScope(pid int, slice string, unitName string) error { // On errors check if the cgroup already exists, if it does move the process there if props, err := conn.GetUnitTypeProperties(unitName, "Scope"); err == nil { if cgroup, ok := props["ControlGroup"].(string); ok && cgroup != "" { - if err := moveUnderCgroup(cgroup, "", []uint32{uint32(pid)}); err != nil { - return err + if err := moveUnderCgroup(cgroup, "", []uint32{uint32(pid)}); err == nil { + return nil } - return nil + // On errors return the original error message we got from StartTransientUnit. } } return err |