aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Rothberg <vrothberg@redhat.com>2022-07-08 15:36:02 +0200
committerValentin Rothberg <vrothberg@redhat.com>2022-07-11 13:06:42 +0200
commit3bb4cf8ee2ca4d2b5fcd16da95a6ebd60b9ed18b (patch)
tree0288ce00eed0d1730f98cd5f07595f77214e52ae
parent62cdc387de982feb796af71252a3fe3d504d570c (diff)
downloadpodman-3bb4cf8ee2ca4d2b5fcd16da95a6ebd60b9ed18b.tar.gz
podman-3bb4cf8ee2ca4d2b5fcd16da95a6ebd60b9ed18b.tar.bz2
podman-3bb4cf8ee2ca4d2b5fcd16da95a6ebd60b9ed18b.zip
libpod: read exit code when cleaning up the runtime
While for some call paths we may be doing this redundantly we need to make sure the exit code is always read at this point. [NO NEW TESTS NEEDED] as I do not manage to reproduce the issue which is very likely caused by a code path not writing the exit code when running concurrently. Fixes: #14859 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
-rw-r--r--libpod/container_internal.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index 560b4a1c1..6a98466c2 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -1104,6 +1104,12 @@ func (c *Container) cleanupRuntime(ctx context.Context) error {
return nil
}
+ // We may be doing this redundantly for some call paths but we need to
+ // make sure the exit code is being read at this point.
+ if err := c.checkExitFile(); err != nil {
+ return err
+ }
+
// If necessary, delete attach and ctl files
if err := c.removeConmonFiles(); err != nil {
return err