summaryrefslogtreecommitdiff
path: root/utils/utils_supported.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2021-11-17 10:06:26 +0100
committerEd Santiago <santiago@redhat.com>2021-11-22 08:25:10 -0700
commit2d265da0ec6d88c0644d96c8077fe15b3ac64ea0 (patch)
treeac32b0644858fde1f1cf7ea6f68e401ce1c88510 /utils/utils_supported.go
parent36b6bf119ed6c2a88bd40fb92fdbd7a30e7a0daa (diff)
downloadpodman-2d265da0ec6d88c0644d96c8077fe15b3ac64ea0.tar.gz
podman-2d265da0ec6d88c0644d96c8077fe15b3ac64ea0.tar.bz2
podman-2d265da0ec6d88c0644d96c8077fe15b3ac64ea0.zip
utils: use podman-pause-$RANDOM.scope name
[Backport of #12323 into v3.4, to fix gating-test flakes] we try hard to re-use the existing podman-pause.scope name when it already exists, causing any sort of race errors when the already existing scope is terminating. There is no such a requirement though, so just try with a random name. Closes: https://github.com/containers/podman/issues/12065 [NO NEW TESTS NEEDED] it fixes a race in the CI Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
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
}