@@ -171,7 +171,15 @@ function _confirm_update() {
171
171
is " $output " " .* system auto-update"
172
172
173
173
since=$( date --iso-8601=seconds)
174
- run_podman auto-update --rollback=false --format " {{.Unit}},{{.Image}},{{.Updated}},{{.Policy}}"
174
+ run_podman ' ?' auto-update --rollback=false --format " {{.Unit}},{{.Image}},{{.Updated}},{{.Policy}}"
175
+ if [[ $status -ne 0 ]]; then
176
+ echo " ------------------------------------ SYSTEMCTL STATUS"
177
+ systemctl status container-$cname .service
178
+ echo " ------------------------------------ JOURNALCAL LOGS"
179
+ journalctl --unit container-$cname .service
180
+ echo " ------------------------------------"
181
+ die " auto update failed with exit code $status : $output "
182
+ fi
175
183
is " $output " " Trying to pull.*" " Image is updated."
176
184
is " $output " " .*container-$cname .service,quay.io/libpod/alpine:latest,true,registry.*" " Image is updated."
177
185
run_podman events --filter type=system --since $since --stream=false
@@ -248,7 +256,15 @@ function _confirm_update() {
248
256
run_podman auto-update --dry-run --format " {{.Unit}},{{.Image}},{{.Updated}},{{.Policy}}"
249
257
is " $output " " .*container-$cname .service,quay.io/libpod/localtest:latest,pending,local.*" " Image update is pending."
250
258
251
- run_podman auto-update --rollback=false --format " {{.Unit}},{{.Image}},{{.Updated}},{{.Policy}}"
259
+ run_podman ' ?' auto-update --rollback=false --format " {{.Unit}},{{.Image}},{{.Updated}},{{.Policy}}"
260
+ if [[ $status -ne 0 ]]; then
261
+ echo " ------------------------------------ SYSTEMCTL STATUS"
262
+ systemctl status container-$cname .service
263
+ echo " ------------------------------------ JOURNALCAL LOGS"
264
+ journalctl --unit container-$cname .service
265
+ echo " ------------------------------------"
266
+ die " auto update failed with exit code $status : $output "
267
+ fi
252
268
is " $output " " .*container-$cname .service,quay.io/libpod/localtest:latest,true,local.*" " Image is updated."
253
269
254
270
_confirm_update $cname $ori_image
353
369
is " $n_updated " " 2" " Number of images updated from registry."
354
370
355
371
for cname in " ${! expect_update[@]} " ; do
372
+ echo " ------------------------------------ SYSTEMCTL STATUS"
373
+ systemctl status container-$cname .service
374
+ echo " ------------------------------------ JOURNALCAL LOGS"
375
+ journalctl --unit container-$cname .service
376
+ echo " ------------------------------------"
356
377
is " $update_log " " .*$cname .*" " container with auto-update policy image updated"
357
378
# Just because podman says it fetched, doesn't mean it actually updated
358
379
_confirm_update $cname $img_id
0 commit comments