diff options
author | Matthew Heon <matthew.heon@gmail.com> | 2018-02-07 16:26:03 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-02-09 15:01:34 +0000 |
commit | c8e296c83e20aeafee920540599c84aead4a4c5d (patch) | |
tree | a2715c47c985138e6d6286d7f695f3b146004800 | |
parent | 9e6855f3480f3710ac0e039754890c5d980a817d (diff) | |
download | podman-c8e296c83e20aeafee920540599c84aead4a4c5d.tar.gz podman-c8e296c83e20aeafee920540599c84aead4a4c5d.tar.bz2 podman-c8e296c83e20aeafee920540599c84aead4a4c5d.zip |
Allow removing pods with running containers if --force is given
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Closes: #268
Approved by: rhatdan
-rw-r--r-- | libpod/runtime_pod.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/runtime_pod.go b/libpod/runtime_pod.go index 44ef453a2..248cadf09 100644 --- a/libpod/runtime_pod.go +++ b/libpod/runtime_pod.go @@ -97,7 +97,7 @@ func (r *Runtime) RemovePod(p *Pod, removeCtrs, force bool) error { } // If the container is running and force is not set we can't do anything - if ctr.state.State == ContainerStateRunning { + if ctr.state.State == ContainerStateRunning && !force { return errors.Wrapf(ErrCtrStateInvalid, "pod %s contains container %s which is running", p.ID(), ctr.ID()) } |