From 40d0d233eb970647918b0f51e5a236c3b24ac4ef Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Tue, 14 Mar 2023 10:16:59 +0100 Subject: [PATCH 1/2] 255-auto-update.bats: turn off rollback where needed To help debug #17607, turn off rollbacks for tests that do not require rollbacks. Error when restarting the systemd units are then not suppressed but returned which should give us more information about what is going on the Debian systems. Signed-off-by: Valentin Rothberg --- test/system/255-auto-update.bats | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/system/255-auto-update.bats b/test/system/255-auto-update.bats index d6afa1b685..12a6e5c5a7 100644 --- a/test/system/255-auto-update.bats +++ b/test/system/255-auto-update.bats @@ -171,7 +171,7 @@ function _confirm_update() { is "$output" ".* system auto-update" since=$(date --iso-8601=seconds) - run_podman auto-update --format "{{.Unit}},{{.Image}},{{.Updated}},{{.Policy}}" + run_podman auto-update --rollback=false --format "{{.Unit}},{{.Image}},{{.Updated}},{{.Policy}}" is "$output" "Trying to pull.*" "Image is updated." is "$output" ".*container-$cname.service,quay.io/libpod/alpine:latest,true,registry.*" "Image is updated." run_podman events --filter type=system --since $since --stream=false @@ -248,7 +248,7 @@ function _confirm_update() { run_podman auto-update --dry-run --format "{{.Unit}},{{.Image}},{{.Updated}},{{.Policy}}" is "$output" ".*container-$cname.service,quay.io/libpod/localtest:latest,pending,local.*" "Image update is pending." - run_podman auto-update --format "{{.Unit}},{{.Image}},{{.Updated}},{{.Policy}}" + run_podman auto-update --rollback=false --format "{{.Unit}},{{.Image}},{{.Updated}},{{.Policy}}" is "$output" ".*container-$cname.service,quay.io/libpod/localtest:latest,true,local.*" "Image is updated." _confirm_update $cname $ori_image From 7a7af735ade0fc12ff413e2724ea4006d4c09691 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Tue, 14 Mar 2023 10:30:32 +0100 Subject: [PATCH 2/2] test/system/255-auto-update.bats: multiple services Wait for all generated services to be ready to be sure we can iron out race conditions. Also disable rollbacks to make sure we can analyze the error if restarting a service fails. This information may be crucial to understand the flakes on Debian as tracked in #17607. Signed-off-by: Valentin Rothberg --- test/system/255-auto-update.bats | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/system/255-auto-update.bats b/test/system/255-auto-update.bats index 12a6e5c5a7..b9ba7f2ca5 100644 --- a/test/system/255-auto-update.bats +++ b/test/system/255-auto-update.bats @@ -338,11 +338,13 @@ EOF fi done - # Only check that the last service is started. Previous services should already be activated. - _wait_service_ready container-$cname.service + # Make sure all services are ready. + for cname in "${cnames[@]}"; do + _wait_service_ready container-$cname.service + done run_podman commit --change CMD=/bin/bash $local_cname quay.io/libpod/localtest:latest # Exit code is expected, due to invalid 'fakevalue' - run_podman 125 auto-update + run_podman 125 auto-update --rollback=false update_log=$output is "$update_log" ".*invalid auto-update policy.*" "invalid policy setup" is "$update_log" ".*Error: invalid auto-update policy.*" "invalid policy setup"