Skip to content

Commit

Permalink
Merge pull request #3558 from mheon/fix_pod_remove
Browse files Browse the repository at this point in the history
Fix a bug where ctrs could not be removed from pods
  • Loading branch information
openshift-merge-robot authored Jul 11, 2019
2 parents d614372 + 8713483 commit 20f1171
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions libpod/runtime_ctr.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,10 +431,12 @@ func (r *Runtime) removeContainer(ctx context.Context, c *Container, force bool,
// If we're removing the pod, the container will be evicted
// from the state elsewhere
if !removePod {
if cleanupErr == nil {
cleanupErr = err
} else {
logrus.Errorf("removing container from pod: %v", err)
if err := r.state.RemoveContainerFromPod(pod, c); err != nil {
if cleanupErr == nil {
cleanupErr = err
} else {
logrus.Errorf("removing container from pod: %v", err)
}
}
}
} else {
Expand Down

0 comments on commit 20f1171

Please sign in to comment.