From 0ae64b143788db81553b7e2ada96d4045d15a551 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Thu, 8 Aug 2024 19:50:21 +0200 Subject: [PATCH] stopIfOnlyInfraRemains: log all errors Log all stopping errors for each ctr. Signed-off-by: Paul Holzinger --- libpod/pod_api.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libpod/pod_api.go b/libpod/pod_api.go index 9b0cd5c32f3d..d385c5628622 100644 --- a/libpod/pod_api.go +++ b/libpod/pod_api.go @@ -262,7 +262,10 @@ func (p *Pod) stopIfOnlyInfraRemains(ctx context.Context, ignoreID string) error } } - _, err = p.stopWithTimeout(ctx, true, -1) + errs, err := p.stopWithTimeout(ctx, true, -1) + for ctr, e := range errs { + logrus.Errorf("Failed to stop container %s: %v", ctr, e) + } return err }