Allow removing pods with running containers if --force is given

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #268
Approved by: rhatdan
This commit is contained in:
Matthew Heon 2018-02-07 16:26:03 -05:00 committed by Atomic Bot
parent 9e6855f348
commit c8e296c83e
1 changed files with 1 additions and 1 deletions

View File

@ -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 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()) return errors.Wrapf(ErrCtrStateInvalid, "pod %s contains container %s which is running", p.ID(), ctr.ID())
} }