Skip to content

Commit

Permalink
Merge pull request #10000 from rhatdan/cleanup
Browse files Browse the repository at this point in the history
Do not delete container twice
  • Loading branch information
openshift-merge-robot authored Apr 13, 2021
2 parents 481556c + 801acb0 commit 21d6b12
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions libpod/runtime_ctr.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 21d6b12

Please sign in to comment.