diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-06-09 10:09:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-09 10:09:14 +0200 |
commit | 79f30af384cf6c74f89c3b44c01707da22d867e5 (patch) | |
tree | 23743436c054a1de091ae7d0ecb008d066786360 /libpod/runtime_ctr.go | |
parent | a85e97952994a2803a17ee2a384b260115f18b43 (diff) | |
parent | 9d964ffb9fc98ed13f6fec974c917b84c175d39a (diff) | |
download | podman-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.go | 6 |
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()) } } |