spiegel_podman/cmd
Paul Holzinger 1ecbae1b5f
fix broken kube play --wait behavior
There is a race condition in the signal handling which manifests itself
as flake in our CI.
In short the old code was running the signal handler in a goroutine but
never waited for it to be finished the main routine just waits for the
container exit so it was possible the process exits in PlayKubeDown()
between the PodStop and PodRm calls. So the container/pod was leaked and
thus the test fails.
This can be easily reproduced by adding a sleep there.

To fix this properly we use a wait group to ensure the goroutine is
finished before we exit. Then there is also no need for the extra bool
and teardown on the non signal path. We can just close the channel there
and cleanup via the signal goroutine which will always fire when the
channel is closed.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-07-14 14:50:55 +02:00
..
podman fix broken kube play --wait behavior 2026-07-14 14:50:55 +02:00
podman-mac-helper Replace os.Is* error checks with errors.Is 2026-05-21 13:09:42 -07:00
podman-testing Fix staticcheck SA4023 warnings in call.go and sign.go 2026-06-12 09:53:20 +02:00
podman-wslkerninst RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
quadlet Use atomic file writer for quadlet unit files 2026-06-29 22:23:57 +02:00
rootlessport Clean up outdated slirp4netns references in comments 2026-04-13 09:05:09 -04:00
winpath Fix GOOS=windows prealloc linter warnings 2026-02-11 11:41:11 -08:00