stopIfOnlyInfraRemains: log all errors

Log all stopping errors for each container so we actually see the real
cause.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2024-08-08 19:50:21 +02:00
parent 277e061878
commit 4aaa5cb6f0

View File

@ -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
}