aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-04-13 16:33:12 +0200
committerGitHub <noreply@github.com>2021-04-13 16:33:12 +0200
commit21d6b12689cc38823fef3772327990f9692d4379 (patch)
tree7128038bbdd30af79d647835d0b665dcd6468560
parent481556cbee53fb18e327a71726a0380481ffb767 (diff)
parent801acb01e227c251e534efa12eb33a2eda4df2de (diff)
downloadpodman-21d6b12689cc38823fef3772327990f9692d4379.tar.gz
podman-21d6b12689cc38823fef3772327990f9692d4379.tar.bz2
podman-21d6b12689cc38823fef3772327990f9692d4379.zip
Merge pull request #10000 from rhatdan/cleanup
Do not delete container twice
-rw-r--r--libpod/runtime_ctr.go14
1 files changed, 0 insertions, 14 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go
index 537618b65..f9b5c5c51 100644
--- a/libpod/runtime_ctr.go
+++ b/libpod/runtime_ctr.go
@@ -616,20 +616,6 @@ func (r *Runtime) removeContainer(ctx context.Context, c *Container, force, remo
}
}
- // Delete the container.
- // Not needed in Configured and Exited states, where the container
- // doesn't exist in the runtime
- if c.state.State != define.ContainerStateConfigured &&
- c.state.State != define.ContainerStateExited {
- if err := c.delete(ctx); err != nil {
- if cleanupErr == nil {
- cleanupErr = err
- } else {
- logrus.Errorf("delete container: %v", err)
- }
- }
- }
-
// Remove the container from the state
if c.config.Pod != "" {
// If we're removing the pod, the container will be evicted