summaryrefslogtreecommitdiff
path: root/utils/utils_supported.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-11-17 11:39:37 +0100
committerGitHub <noreply@github.com>2021-11-17 11:39:37 +0100
commit802f26ef1039ea3a95c54fce53ea2ed99822e1c3 (patch)
tree83a2706db6a84b5db078645bf914f1b5eb9ea8d6 /utils/utils_supported.go
parentc6616648780881ac717817cf79de84084ce7c02f (diff)
parentee62711136339c5daf38e38859227d85b06fc32a (diff)
downloadpodman-802f26ef1039ea3a95c54fce53ea2ed99822e1c3.tar.gz
podman-802f26ef1039ea3a95c54fce53ea2ed99822e1c3.tar.bz2
podman-802f26ef1039ea3a95c54fce53ea2ed99822e1c3.zip
Merge pull request #12323 from giuseppe/utils-not-unique-pause-scope-name
utils: use podman-pause-$RANDOM.scope name
Diffstat (limited to 'utils/utils_supported.go')
-rw-r--r--utils/utils_supported.go9
1 files changed, 0 insertions, 9 deletions
diff --git a/utils/utils_supported.go b/utils/utils_supported.go
index 1404e3194..0f0c9a9ba 100644
--- a/utils/utils_supported.go
+++ b/utils/utils_supported.go
@@ -44,15 +44,6 @@ func RunUnderSystemdScope(pid int, slice string, unitName string) error {
ch := make(chan string)
_, err = conn.StartTransientUnit(unitName, "replace", properties, ch)
if err != nil {
- // 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 nil
- }
- // On errors return the original error message we got from StartTransientUnit.
- }
- }
return err
}