aboutsummaryrefslogtreecommitdiff
path: root/libpod/runtime_ctr.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-06-09 10:09:14 +0200
committerGitHub <noreply@github.com>2020-06-09 10:09:14 +0200
commit79f30af384cf6c74f89c3b44c01707da22d867e5 (patch)
tree23743436c054a1de091ae7d0ecb008d066786360 /libpod/runtime_ctr.go
parenta85e97952994a2803a17ee2a384b260115f18b43 (diff)
parent9d964ffb9fc98ed13f6fec974c917b84c175d39a (diff)
downloadpodman-79f30af384cf6c74f89c3b44c01707da22d867e5.tar.gz
podman-79f30af384cf6c74f89c3b44c01707da22d867e5.tar.bz2
podman-79f30af384cf6c74f89c3b44c01707da22d867e5.zip
Merge pull request #6520 from mheon/no_conmon_no_error
Ensure Conmon is alive before waiting for exit file
Diffstat (limited to 'libpod/runtime_ctr.go')
-rw-r--r--libpod/runtime_ctr.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go
index 655b42e51..aa91dff03 100644
--- a/libpod/runtime_ctr.go
+++ b/libpod/runtime_ctr.go
@@ -464,9 +464,11 @@ func (r *Runtime) removeContainer(ctx context.Context, c *Container, force bool,
}
}
- // Check that the container's in a good state to be removed
+ // Check that the container's in a good state to be removed.
if c.state.State == define.ContainerStateRunning {
- if err := c.stop(c.StopTimeout()); err != nil {
+ // Ignore ErrConmonDead - we couldn't retrieve the container's
+ // exit code properly, but it's still stopped.
+ if err := c.stop(c.StopTimeout()); err != nil && errors.Cause(err) != define.ErrConmonDead {
return errors.Wrapf(err, "cannot remove container %s as it could not be stopped", c.ID())
}
}