diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-09-25 09:35:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-25 09:35:40 +0200 |
commit | e4835f6b01d6455b74a448aa22538fb1d3491350 (patch) | |
tree | 5641a7c1e74ed8a57ec059542d73e2e913c57987 /libpod/container_internal_linux.go | |
parent | 525be7d3db4d21aa39ecf1a164d0f861b9062b9c (diff) | |
parent | b57d2f4cc7bb26e8bd2ec4cf4eb66f739ed3beb4 (diff) | |
download | podman-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.go | 7 |
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) +} |