Merge pull request #3558 from mheon/fix_pod_remove

Fix a bug where ctrs could not be removed from pods
This commit is contained in:
OpenShift Merge Robot
2019-07-11 21:35:53 +02:00
committed by GitHub

View File

@ -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 {