Skip to content

spurious errors on pod termination #18414

Closed

Description

@danwinship

There's some sort of race/bad coordination in kubelet when pods are terminated, such that it keeps trying to do status checks even after it has started terminating the pod, often resulting in:

Feb 01 18:20:44 ci-prtest-5a37c28-15429-ig-n-qzmw origin-node[10940]: I0201 18:20:44.622016   10940 kubelet.go:1852] SyncLoop (DELETE, "api"): "dns-test-8a31e45e-077c-11e8-9376-0e8c3420a542_e2e-tests-dns-g9vhj(8a3a5941-077c-11e8-b172-42010a8e0005)"                                                                   
Feb 01 18:20:44 ci-prtest-5a37c28-15429-ig-n-qzmw origin-node[10940]: I0201 18:20:44.622162   10940 kubelet.go:1846] SyncLoop (REMOVE, "api"): "dns-test-8a31e45e-077c-11e8-9376-0e8c3420a542_e2e-tests-dns-g9vhj(8a3a5941-077c-11e8-b172-42010a8e0005)"                                                                   
Feb 01 18:20:44 ci-prtest-5a37c28-15429-ig-n-qzmw origin-node[10940]: W0201 18:20:44.688273   10940 docker_sandbox.go:340] failed to read pod IP from plugin/docker: NetworkPlugin cni failed on the status hook for pod "dns-test-8a31e45e-077c-11e8-9376-0e8c3420a542_e2e-tests-dns-g9vhj": Unexpected command output nsenter: cannot open /proc/49301/ns/net: No such file or directory
Feb 01 18:20:44 ci-prtest-5a37c28-15429-ig-n-qzmw origin-node[10940]: with error: exit status 1                                                                                                                                                                                                                           

While this doesn't seem to cause any actual problems, the log messages are spammy, and make it look like something has gone wrong.

Clayton says "Can you open a bug for that and assign it to Seth? I think it happens on every pod termination now."

Activity

  1. dcbw commented on Feb 2, 2018

    @dcbw
    Contributor

    Yeah, and it shouldn't be happening. Any way to get better node logs here? I tried to reproduce yesterday but could not.

  2. danwinship commented on Feb 2, 2018

    @danwinship
    ContributorAuthor

    "Better node logs" as compared to what?

    Note that you can click "View job in Jenkins" at the top of a test run and then "S3 artifacts" from there to get to the full origin-node.service logs. Eg, all 4 nodes on https://ci.openshift.redhat.com/jenkins/job/test_branch_origin_extended_conformance_gce/2380/s3/ are full of "failed to read pod IP" errors.

  3. dcbw commented on Feb 2, 2018

    @dcbw
    Contributor

    Ah I was looking at the extended networking test logs which don't appear to have the node journals.

    But also, we apparently run with --loglevel=4 now, not 5, so we lose a lot of useful log messages.

  4. dcbw commented on Feb 3, 2018

    @dcbw
    Contributor

    So this is Kubelet being stupid. It will run StopPodSandbox() multiple times in parallel for the same sandbox. And dockershim's StopPodSanbox() itself calls GetPodSandboxStatus() which checks the IP and that's where the error is coming from. That's because there's a race where the first StopPodSandbox is in TearDownPod() (and thus the networkReady suppression code isn't triggered yet) and the second StopPodSandbox() then asks for the pod IP. Before that can run nsenter, TearDownPod() completes and the first StopPodSandbox() stops the sandbox container and destroys the netns. Then the second StopPodSanbox()'s GetPodSandboxStatus() finally gets around to running nsenter and fails.

  5. dcbw commented on Feb 3, 2018

    @dcbw
    Contributor
  6. danwinship commented on Feb 3, 2018

    @danwinship
    ContributorAuthor

    Ah I was looking at the extended networking test logs which don't appear to have the node journals.

    They do, it's just not obvious where: artifacts/scripts/networking/logs/{subnet,multitenant,networkpolicy}/{nettest-master,nettest-node-1,nettest-node-2}/systemd.log.gz

  7. assigned and unassigned on Feb 5, 2018
  8. added
    kind/bug
    on Feb 6, 2018
  9. added a commit that references this issue on Mar 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugpriority/P2sig/networking

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions