diff options
author | Matthew Heon <matthew.heon@gmail.com> | 2018-10-02 12:07:23 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@gmail.com> | 2018-10-02 12:07:23 -0400 |
commit | 39d7c869ea9291352e836f3c170d9bd801f9c35c (patch) | |
tree | 8731f10af901fb731aacc6a774fccd5edaa16ebb /libpod/runtime_ctr.go | |
parent | 29dbab64407d11f314b894c37deb4419faeefc56 (diff) | |
download | podman-39d7c869ea9291352e836f3c170d9bd801f9c35c.tar.gz podman-39d7c869ea9291352e836f3c170d9bd801f9c35c.tar.bz2 podman-39d7c869ea9291352e836f3c170d9bd801f9c35c.zip |
Fix bug with exited state and container remove
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Diffstat (limited to 'libpod/runtime_ctr.go')
-rw-r--r-- | libpod/runtime_ctr.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go index 0fe896e5f..4256a84a0 100644 --- a/libpod/runtime_ctr.go +++ b/libpod/runtime_ctr.go @@ -262,7 +262,8 @@ func (r *Runtime) removeContainer(ctx context.Context, c *Container, force bool) } } else if !(c.state.State == ContainerStateConfigured || c.state.State == ContainerStateCreated || - c.state.State == ContainerStateStopped) { + c.state.State == ContainerStateStopped || + c.state.State == ContainerStateExited) { return errors.Wrapf(ErrCtrStateInvalid, "cannot remove container %s as it is %s - running or paused containers cannot be removed", c.ID(), c.state.State.String()) } |