Commit 72710b75 authored by Dan Williams's avatar Dan Williams

Revert "Return empty network namespace if the infra container has exited"

This reverts commit fee4c9a7. This is not the correct fix for the problem; and it causes other problems like continuous: docker_sandbox.go:234] NetworkPlugin cni failed on the status hook for pod "someotherdc-1-deploy_default": Unexpected command output nsenter: cannot open : No such file or directory with error: exit status 1 Because GetNetNS() is returning an empty network namespace. That is not helpful nor should really be allowed; that's what the error return from GetNetNS() is for.
parent 695d4385
......@@ -267,12 +267,6 @@ func getApparmorSecurityOpts(sc *runtimeapi.LinuxContainerSecurityContext, separ
}
func getNetworkNamespace(c *dockertypes.ContainerJSON) string {
if c.State.Pid == 0 {
// Docker reports pid 0 for an exited container. We can't use it to
// check the network namespace, so return an empty string instead.
glog.V(4).Infof("Cannot find network namespace for the terminated container %q", c.ID)
return ""
}
return fmt.Sprintf(dockerNetNSFmt, c.State.Pid)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment