From 1647352264e4a19d69438727688e9dee6c62ce3a Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Tue, 30 Jul 2024 16:44:37 +0200 Subject: [PATCH] test/system: podman play --service-container slog to syslog In theory when syslog is set the cleanup process should log its errors to syslog (journald) so we can have a look at the errors in CI. Without it podman container cleanup errors will never be logged anywhere. In order to rey to debug #21569 Signed-off-by: Paul Holzinger --- test/system/700-play.bats | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/test/system/700-play.bats b/test/system/700-play.bats index 59da360f0343..7a0806b48e6a 100644 --- a/test/system/700-play.bats +++ b/test/system/700-play.bats @@ -167,9 +167,8 @@ RELABEL="system_u:object_r:container_file_t:s0" # Run `play kube` in the background as it will wait for the service # container to exit. - log=/tmp/podman-kube-bg.log timeout --foreground -v --kill=10 60 \ - $PODMAN play kube --service-container=true --log-driver journald $TESTYAML &>$log & + $PODMAN --syslog play kube --service-container=true --log-driver journald $TESTYAML &>/dev/null & # Wait for the container to be running container_a=$PODCTRNAME @@ -211,7 +210,7 @@ RELABEL="system_u:object_r:container_file_t:s0" is "$output" "true" # Restart the pod, make sure the service is running again - run_podman pod restart $PODNAME + run_podman --syslog pod restart $PODNAME run_podman container inspect $service_container --format "{{.State.Running}}" is "$output" "true" @@ -222,17 +221,13 @@ RELABEL="system_u:object_r:container_file_t:s0" is "$output" "Error: container .* is the service container of pod(s) .* and cannot be removed without removing the pod(s)" # Kill the pod and make sure the service is not running - run_podman pod kill $PODNAME + run_podman --syslog pod kill $PODNAME _ensure_container_running $service_container false - echo - echo "cat $log:" - cat $log - echo run_podman network ls # Remove the pod and make sure the service is removed along with it - run_podman pod rm $PODNAME + run_podman --syslog pod rm $PODNAME run_podman 1 container exists $service_container }