summaryrefslogtreecommitdiff
path: root/libpod/container_internal_linux.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-09-25 09:35:40 +0200
committerGitHub <noreply@github.com>2019-09-25 09:35:40 +0200
commite4835f6b01d6455b74a448aa22538fb1d3491350 (patch)
tree5641a7c1e74ed8a57ec059542d73e2e913c57987 /libpod/container_internal_linux.go
parent525be7d3db4d21aa39ecf1a164d0f861b9062b9c (diff)
parentb57d2f4cc7bb26e8bd2ec4cf4eb66f739ed3beb4 (diff)
downloadpodman-e4835f6b01d6455b74a448aa22538fb1d3491350.tar.gz
podman-e4835f6b01d6455b74a448aa22538fb1d3491350.tar.bz2
podman-e4835f6b01d6455b74a448aa22538fb1d3491350.zip
Merge pull request #4086 from mheon/cni_del_on_refresh
Force a CNI Delete on refreshing containers
Diffstat (limited to 'libpod/container_internal_linux.go')
-rw-r--r--libpod/container_internal_linux.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go
index e7b4b2b22..2636fdb6c 100644
--- a/libpod/container_internal_linux.go
+++ b/libpod/container_internal_linux.go
@@ -1325,3 +1325,10 @@ func (c *Container) copyOwnerAndPerms(source, dest string) error {
}
return nil
}
+
+// Teardown CNI config on refresh
+func (c *Container) refreshCNI() error {
+ // Let's try and delete any lingering network config...
+ podNetwork := c.runtime.getPodNetwork(c.ID(), c.config.Name, "", c.config.Networks, c.config.PortMappings, c.config.StaticIP)
+ return c.runtime.netPlugin.TearDownPod(podNetwork)
+}