clean_setup: create pause image

Workaround for #23292, where simultaneous 'pod create' commands
will all start a podman-build of the pause image, but only
one of them will be tagged, and the others will leak <none>
images.

Signed-off-by: Ed Santiago <santiago@redhat.com>
This commit is contained in:
Ed Santiago 2024-09-17 11:15:56 -06:00
parent d571ca6536
commit bcffa9ce30
1 changed files with 11 additions and 0 deletions

View File

@ -452,6 +452,17 @@ function clean_setup() {
if [[ -z "$found_needed_image" ]]; then if [[ -z "$found_needed_image" ]]; then
_prefetch $PODMAN_TEST_IMAGE_FQN _prefetch $PODMAN_TEST_IMAGE_FQN
fi fi
# When running in parallel, load (create, actually) the pause image.
# This way, all pod tests will have it available. Without this,
# parallel pod tests will leave behind <none>:<none> images.
# FIXME: #23292 -- this should not be necessary.
if [[ -n "$PARALLEL_JOBSLOT" ]]; then
run_podman pod create mypod
run_podman pod rm mypod
# And now, we have a pause image, and each test does not
# need to build their own.
fi
} }
# END setup/teardown tools # END setup/teardown tools