Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Mar 21, 2018

Conversation

dcbw
Copy link
Contributor

@dcbw dcbw commented Feb 3, 2018

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

@openshift-ci-robot openshift-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Feb 3, 2018
@openshift-merge-robot openshift-merge-robot added the vendor-update Touching vendor dir or related files label Feb 3, 2018
@dcbw dcbw added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 3, 2018
@dcbw dcbw removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 27, 2018
@dcbw
Copy link
Contributor Author

dcbw commented Feb 27, 2018

kubernetes/kubernetes#59301 has merged now.

@openshift/networking @danwinship PTAL thanks!

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().
@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 27, 2018
@danwinship
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 27, 2018
Copy link

@pravisankar pravisankar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dcbw
Copy link
Contributor Author

dcbw commented Feb 28, 2018

/retest

@dcbw
Copy link
Contributor Author

dcbw commented Feb 28, 2018

/test gcp

3 similar comments
@dcbw
Copy link
Contributor Author

dcbw commented Mar 1, 2018

/test gcp

@dcbw
Copy link
Contributor Author

dcbw commented Mar 5, 2018

/test gcp

@dcbw
Copy link
Contributor Author

dcbw commented Mar 16, 2018

/test gcp

@dcbw
Copy link
Contributor Author

dcbw commented Mar 16, 2018

@derekwaynecarr any chance you could review and approve this backport? Thanks!

@smarterclayton
Copy link
Contributor

/retest

@dcbw
Copy link
Contributor Author

dcbw commented Mar 19, 2018

/test gcp issue #17897

@dcbw
Copy link
Contributor Author

dcbw commented Mar 20, 2018

@eparis can anyone you know of approve this one?

@eparis
Copy link
Member

eparis commented Mar 20, 2018

/approve

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: danwinship, dcbw, eparis

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 20, 2018
@openshift-merge-robot
Copy link
Contributor

/test all [submit-queue is verifying that this PR is safe to merge]

@pravisankar
Copy link

/test cmd

@openshift-merge-robot
Copy link
Contributor

Automatic merge from submit-queue.

@openshift-merge-robot openshift-merge-robot merged commit 73e9c8f into openshift:master Mar 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. vendor-update Touching vendor dir or related files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants