Skip to content

Commit

Permalink
Merge pull request #18425 from dcbw/kube-59301-backport
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue.

UPSTREAM: 59301: dockershim: don't check pod IP in StopPodSandbox

We're about to tear the container down, there's no point.  It also suppresses
an annoying error message due to kubelet stupidity that causes multiple
parallel calls to StopPodSandbox for the same sandbox.

docker_sandbox.go:355] failed to read pod IP from plugin/docker: NetworkPlugin cni failed on the status hook for pod "docker-registry-1-deploy_default": Unexpected command output nsenter: cannot open /proc/22646/ns/net: No such file or directory

1) A first StopPodSandbox() request triggered by SyncLoop(PLEG) for
a ContainerDied event calls into TearDownPod() and thus the network
plugin.  Until this completes, networkReady=true for the
sandbox.

2) A second StopPodSandbox() request triggered by SyncLoop(REMOVE)
calls PodSandboxStatus() and calls into the network plugin to read
the IP address because networkReady=true

3) The first request exits the network plugin, sets networReady=false,
and calls StopContainer() on the sandbox.  This destroys the network
namespace.

4) The second request finally gets around to running nsenter but
the network namespace is already destroyed.  It returns an error
which is logged by getIP().

Fixes: #18414

@danwinship
  • Loading branch information
openshift-merge-robot authored Mar 21, 2018
2 parents b5f97cd + acac9a8 commit 73e9c8f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
37 changes: 22 additions & 15 deletions vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_sandbox.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 73e9c8f

Please sign in to comment.