podman/pkg/util
Paul Holzinger bab95de9a2
rootless: make sure we only use a single pause process
Currently --tmpdir changes the location of the pause.pid file. this
causes issues because the c code in pkg/rootless does not know about
that. I tried to fix this[1] by fixing the c code to not use the
shortcut. While this fix worked it will result in many pause processes
leaking in the integrration tests.

Commit ab88632 added this behavior but following the disccusion it was
never the intention that we end up having more than one pause process.
The issues that was trying to fix was caused by somthing else AFAICT,
the main problem seems to be that the pause.pid file parent directory
may not be created when we try to create the pid file so it failed with
ENOENT. This patch fixes it by creating this directory always and revert
the change to no longer depend on the tmpdir value.

With this commit we now always use XDG_RUNTIME_DIR/libpod/tmp/pause.pid
for all podman processes. This allows the c shortcut to work reliably
and should therefore improve perfomance over my other approach.

A system test is added to ensure we see the right behavior and that
podman system migrate actually stops the pause process. Thanks to Ed
Santiago for the improved test to make it work for both `catatonit` and
`podman pause`.

This should fix the issues with namespace missmatches that we can see in
CI as flakes.

[1] https://github.com/containers/podman/pull/18057

Fixes #18057

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-04-11 10:57:46 +02:00
..
camelcase Fix typos 2023-02-11 18:23:24 +01:00
filters.go prune filter handling 2022-07-25 09:28:26 -04:00
filters_test.go prune filter handling 2022-07-25 09:28:26 -04:00
kube.go play kube: Allow the user to import the contents of a tar file into a volume 2022-10-25 15:11:25 +03:00
mountOpts.go libpod: mount safely subpaths 2023-03-31 19:48:03 +02:00
mountOpts_linux.go Turn off 'noexec' option by default for named volumes 2020-05-20 16:48:20 -04:00
mountOpts_other.go go fmt: use go 1.18 conditional-build syntax 2022-03-18 09:11:53 +01:00
utils.go Merge pull request #16315 from flouthoc/remote-ignore-symlink 2023-03-28 23:23:07 +02:00
utils_darwin.go pkg: switch to golang native error wrapping 2022-07-08 08:54:47 +02:00
utils_freebsd.go pkg/util: Add pid information descriptors for FreeBSD 2022-10-17 15:33:04 +01:00
utils_linux.go Do not mount /dev/tty into rootless containers 2023-01-31 22:10:26 +02:00
utils_linux_test.go Match VT device paths to be blocked from mounting exactly 2023-01-28 05:18:40 -05:00
utils_supported.go rootless: make sure we only use a single pause process 2023-04-11 10:57:46 +02:00
utils_test.go utils: new conversion method 2023-02-01 09:26:50 +01:00
utils_unsupported.go pkg: Build pkg/util on FreeBSD 2022-08-13 07:53:34 +01:00
utils_windows.go rootless: make sure we only use a single pause process 2023-04-11 10:57:46 +02:00