Skip to content

Commit

Permalink
Merge pull request #9614 from Luap99/fix-9602
Browse files Browse the repository at this point in the history
Fix cni teardown errors
  • Loading branch information
openshift-merge-robot authored Mar 4, 2021
2 parents 8336700 + aa0a57f commit 17cacea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion libpod/networking_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ func (r *Runtime) teardownCNI(ctr *Container) error {
requestedMAC = ctr.config.StaticMAC
}

podNetwork := r.getPodNetwork(ctr.ID(), ctr.Name(), ctr.state.NetNS.Path(), networks, ctr.config.PortMappings, requestedIP, requestedMAC, ContainerNetworkDescriptions{})
podNetwork := r.getPodNetwork(ctr.ID(), ctr.Name(), ctr.state.NetNS.Path(), networks, ctr.config.PortMappings, requestedIP, requestedMAC, ctr.state.NetInterfaceDescriptions)

if err := r.netPlugin.TearDownPod(podNetwork); err != nil {
return errors.Wrapf(err, "error tearing down CNI namespace configuration for container %s", ctr.ID())
Expand Down
7 changes: 7 additions & 0 deletions test/e2e/network_connect_disconnect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,13 @@ var _ = Describe("Podman network connect and disconnect", func() {
exec = podmanTest.Podman([]string{"exec", "-it", "test", "ip", "addr", "show", "eth1"})
exec.WaitWithDefaultTimeout()
Expect(exec.ExitCode()).To(BeZero())

// make sure no logrus errors are shown https://github.com/containers/podman/issues/9602
rm := podmanTest.Podman([]string{"rm", "-f", "test"})
rm.WaitWithDefaultTimeout()
Expect(rm.ExitCode()).To(BeZero())
Expect(rm.ErrorToString()).To(Equal(""))

})

It("podman network connect when not running", func() {
Expand Down

0 comments on commit 17cacea

Please sign in to comment.