Commit 53460ceb authored by Martin Peres's avatar Martin Peres
Browse files

initscript/cleanup_container: work around a race condition in podman

Fixes: 4f812b88
parent 335a149f
......@@ -335,14 +335,18 @@ function start_post_containers {
function container_cleanup {
# HACK: podman has a nice race condition, so let's give a bit of time to
# settle down... Sleeping isn't a problem here, since we are done testing :)
sleep 1
# Stop and delete all the containers that may still be running.
# This should be a noop, but I would rather be safe than sorry :)
podman container stop -a -f
podman container stop -a
podman umount -a -f
podman container prune -f
# Remove all the images older than 2 weeks old
podman image prune -a -f --filter "until=336h"
# Remove all the dangling images
podman image prune -f
# Do not print all the early commands
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment