summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-07-11 21:35:53 +0200
committerGitHub <noreply@github.com>2019-07-11 21:35:53 +0200
commit20f11718def2a5bf5af96363e9c7082ba48077f4 (patch)
tree12d497701cf9cbb9f5fc4eda61a62addc5e71279 /libpod
parentd614372c2f39cea32641ec92c84a9e48657cfb41 (diff)
parent8713483362904911c699d1cb3bdfcbd6694f30a2 (diff)
downloadpodman-20f11718def2a5bf5af96363e9c7082ba48077f4.tar.gz
podman-20f11718def2a5bf5af96363e9c7082ba48077f4.tar.bz2
podman-20f11718def2a5bf5af96363e9c7082ba48077f4.zip
Merge pull request #3558 from mheon/fix_pod_remove
Fix a bug where ctrs could not be removed from pods
Diffstat (limited to 'libpod')
-rw-r--r--libpod/runtime_ctr.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go
index 760a07daf..4b3aeaa37 100644
--- a/libpod/runtime_ctr.go
+++ b/libpod/runtime_ctr.go
@@ -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 {