Skip to content

test/end-to-end/core.sh:23: executing 'oc get -n test pods -l name=frontend' expecting any result and text 'Running' #12927

Closed

Description

@stevekuznetsov

Looks like this:

FAILURE after 119.719s: test/end-to-end/core.sh:23: executing 'oc get -n test pods -l name=frontend' expecting any result and text 'Running'; re-trying every 0.2s until completion or 120.000s: the command timed out
Standard output from the command:
...
NAME               READY     STATUS        RESTARTS   AGE
frontend-1-22h75   1/1       Terminating   0          33s
frontend-1-qltn8   1/1       Terminating   0          33s
... repeated 2 times
Standard error from the command:
No resources found.
... repeated 215 times
[ERROR] PID 21108: hack/lib/cmd.sh:618: `return "${return_code}"` exited with status 1.
[INFO] 		Stack Trace: 
[INFO] 		  1: hack/lib/cmd.sh:618: `return "${return_code}"`
[INFO] 		  2: test/end-to-end/core.sh:23: os::cmd::try_until_text
[INFO] 		  3: test/end-to-end/core.sh:428: wait_for_app
[INFO]   Exiting with code 1.

Looks like the pods are always in terminating state.

Click for full output
FAILURE after 119.719s: test/end-to-end/core.sh:23: executing 'oc get -n test pods -l name=frontend' expecting any result and text 'Running'; re-trying every 0.2s until completion or 120.000s: the command timed out
01:09:33.885 Standard output from the command:
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   0/1       Terminating   0          0s
01:09:33.885 frontend-1-qltn8   0/1       Terminating   0          0s
01:09:33.885 ... repeated 2 times
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   0/1       Terminating   0          1s
01:09:33.885 frontend-1-qltn8   0/1       Terminating   0          1s
01:09:33.885 ... repeated 2 times
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   0/1       Terminating   0          2s
01:09:33.885 frontend-1-qltn8   0/1       Terminating   0          2s
01:09:33.885 ... repeated 2 times
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   0/1       Terminating   0          3s
01:09:33.885 frontend-1-qltn8   0/1       Terminating   0          3s
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   1/1       Terminating   0          3s
01:09:33.885 frontend-1-qltn8   1/1       Terminating   0          3s
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   1/1       Terminating   0          4s
01:09:33.885 frontend-1-qltn8   1/1       Terminating   0          4s
01:09:33.885 ... repeated 2 times
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   1/1       Terminating   0          5s
01:09:33.885 frontend-1-qltn8   1/1       Terminating   0          5s
01:09:33.885 ... repeated 3 times
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   1/1       Terminating   0          6s
01:09:33.885 frontend-1-qltn8   1/1       Terminating   0          6s
01:09:33.885 ... repeated 2 times
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   1/1       Terminating   0          7s
01:09:33.885 frontend-1-qltn8   1/1       Terminating   0          7s
01:09:33.885 ... repeated 3 times
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   1/1       Terminating   0          8s
01:09:33.885 frontend-1-qltn8   1/1       Terminating   0          8s
01:09:33.885 ... repeated 2 times
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   1/1       Terminating   0          9s
01:09:33.885 frontend-1-qltn8   1/1       Terminating   0          9s
01:09:33.885 ... repeated 3 times
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   1/1       Terminating   0          10s
01:09:33.885 frontend-1-qltn8   1/1       Terminating   0          10s
01:09:33.885 ... repeated 2 times
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   1/1       Terminating   0          11s
01:09:33.885 frontend-1-qltn8   1/1       Terminating   0          11s
01:09:33.885 ... repeated 2 times
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   1/1       Terminating   0          12s
01:09:33.885 frontend-1-qltn8   1/1       Terminating   0          12s
01:09:33.885 ... repeated 3 times
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   1/1       Terminating   0          13s
01:09:33.885 frontend-1-qltn8   1/1       Terminating   0          13s
01:09:33.885 ... repeated 3 times
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   1/1       Terminating   0          14s
01:09:33.885 frontend-1-qltn8   1/1       Terminating   0          14s
01:09:33.885 ... repeated 2 times
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   1/1       Terminating   0          15s
01:09:33.885 frontend-1-qltn8   1/1       Terminating   0          15s
01:09:33.885 ... repeated 3 times
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   1/1       Terminating   0          16s
01:09:33.885 frontend-1-qltn8   1/1       Terminating   0          16s
01:09:33.885 ... repeated 2 times
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   1/1       Terminating   0          17s
01:09:33.885 frontend-1-qltn8   1/1       Terminating   0          17s
01:09:33.885 ... repeated 3 times
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   1/1       Terminating   0          18s
01:09:33.885 frontend-1-qltn8   1/1       Terminating   0          18s
01:09:33.885 ... repeated 2 times
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   1/1       Terminating   0          19s
01:09:33.885 frontend-1-qltn8   1/1       Terminating   0          19s
01:09:33.885 ... repeated 2 times
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   1/1       Terminating   0          20s
01:09:33.885 frontend-1-qltn8   1/1       Terminating   0          20s
01:09:33.885 ... repeated 3 times
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   1/1       Terminating   0          21s
01:09:33.885 frontend-1-qltn8   1/1       Terminating   0          21s
01:09:33.885 ... repeated 3 times
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   1/1       Terminating   0          22s
01:09:33.885 frontend-1-qltn8   1/1       Terminating   0          22s
01:09:33.885 ... repeated 2 times
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   1/1       Terminating   0          23s
01:09:33.885 frontend-1-qltn8   1/1       Terminating   0          23s
01:09:33.885 ... repeated 2 times
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   1/1       Terminating   0          24s
01:09:33.885 frontend-1-qltn8   1/1       Terminating   0          24s
01:09:33.885 ... repeated 3 times
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   1/1       Terminating   0          25s
01:09:33.885 frontend-1-qltn8   1/1       Terminating   0          25s
01:09:33.885 ... repeated 2 times
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   1/1       Terminating   0          26s
01:09:33.885 frontend-1-qltn8   1/1       Terminating   0          26s
01:09:33.885 ... repeated 3 times
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   1/1       Terminating   0          27s
01:09:33.885 frontend-1-qltn8   1/1       Terminating   0          27s
01:09:33.885 ... repeated 2 times
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   1/1       Terminating   0          28s
01:09:33.885 frontend-1-qltn8   1/1       Terminating   0          28s
01:09:33.885 ... repeated 3 times
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   1/1       Terminating   0          29s
01:09:33.885 frontend-1-qltn8   1/1       Terminating   0          29s
01:09:33.885 ... repeated 2 times
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   1/1       Terminating   0          30s
01:09:33.885 frontend-1-qltn8   1/1       Terminating   0          30s
01:09:33.885 ... repeated 3 times
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   1/1       Terminating   0          31s
01:09:33.885 frontend-1-qltn8   1/1       Terminating   0          31s
01:09:33.885 ... repeated 2 times
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   1/1       Terminating   0          32s
01:09:33.885 frontend-1-qltn8   1/1       Terminating   0          32s
01:09:33.885 ... repeated 3 times
01:09:33.885 NAME               READY     STATUS        RESTARTS   AGE
01:09:33.885 frontend-1-22h75   1/1       Terminating   0          33s
01:09:33.885 frontend-1-qltn8   1/1       Terminating   0          33s
01:09:33.885 ... repeated 2 times
01:09:33.885 Standard error from the command:
01:09:33.885 No resources found.
01:09:33.885 ... repeated 6 times
01:09:33.885 No resources found.
01:09:33.885 ... repeated 215 times
01:09:33.898 
[ERROR] PID 21108: hack/lib/cmd.sh:618: `return "${return_code}"` exited with status 1.
01:09:33.898 [INFO] 		Stack Trace: 
01:09:33.898 [INFO] 		  1: hack/lib/cmd.sh:618: `return "${return_code}"`
01:09:33.901 [INFO] 		  2: test/end-to-end/core.sh:23: os::cmd::try_until_text
01:09:33.904 [INFO] 		  3: test/end-to-end/core.sh:428: wait_for_app
01:09:33.904 [INFO]   Exiting with code 1.
01:09:33.910 [ERROR] PID 19877: hack/test-end-to-end-docker.sh:91: `${OS_ROOT}/test/end-to-end/core.sh` exited with status 1.
01:09:33.910 [INFO] 		Stack Trace: 
01:09:33.910 [INFO] 		  1: hack/test-end-to-end-docker.sh:91: `${OS_ROOT}/test/end-to-end/core.sh`
01:09:33.910 [INFO]   Exiting with code 1.

Activity

  1. added
    kind/test-flake
    on Feb 11, 2017
  2. bparees commented on Feb 12, 2017

    @bparees
    Contributor

    how can pods be age 0 and be in a terminating state already?

  3. bparees commented on Feb 12, 2017

    @bparees
    Contributor

    from the origin container logs:

    I0211 09:01:48.523912   20718 docker_manager.go:1578] Container "22019b3688ab82525de3032721b1244a474f1b06c042cd3cd90da75e440cb139 ruby-helloworld test/frontend-1-22h75" exited after 30.212560156s
    

    unfortunately we don't seem to have logs for the frontend container itself to see why it would have exited.

    I also see this:

    I0211 09:01:48.524069   20718 server.go:664] Event(api.ObjectReference{Kind:"Pod", Namespace:"test", Name:"frontend-1-22h75", UID:"a4a1ded9-f038-11e6-a78a-0ee8b9b9e750", APIVersion:"v1", ResourceVersion:"1989", FieldPath:"spec.containers{ruby-helloworld}"}): type: 'Normal' reason: 'Killing' Killing container with docker id 22019b3688ab: Need to kill pod.
    I0211 09:01:48.527079   20718 panics.go:76] POST /api/v1/namespaces/test/events: (2.452996ms) 201 [[openshift/v1.5.2+43a9be4 (linux/amd64) kubernetes/43a9be4] 172.18.1.193:37132]
    I0211 09:01:48.642465   20718 docker_manager.go:1460] Calling network plugin kubernetes.io/no-op to tear down pod for frontend-1-22h75_test
    I0211 09:01:48.644462   20718 docker_manager.go:1537] Killing container "80a1bb71793122343e1e4cb81244bd2d357518b680e3027ac2b09bd27853c617 test/frontend-1-22h75" with 30 second grace period
    

    but i can't tell if that's a cause or an effect of the container exiting. (it comes later in the log).

    it also looks like immediately after the pod "terminates" it shows up as "running" (???)

    I0211 09:01:49.145351   20718 controller_utils.go:718] Ignoring inactive pod tes
    t/frontend-1-22h75 in state Running, deletion time 2017-02-11 09:01:45.333912866
     +0000 UTC
    

    though obviously the test script did not see it in that state. Note that it also now has a deletion time associated.

    it also looks like the replication controller is having some role in deleting it:

    I0211 09:01:49.171878   20718 replication_controller.go:441] Pod test/frontend-1-22h75 deleted through github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/controller/replication.(*ReplicationManager).updatePod, timestamp 2017-02-11 09:01:45.333912866 +0000 UTC, labels map[deploymentconfig:frontend name:frontend deployment:frontend-1].
    
  4. mfojtik commented on Feb 22, 2017

    @mfojtik
    Contributor

    @bparees i guess the replication controller deleted that pod as result of scale to 0 action

  5. mfojtik commented on Feb 22, 2017

    @mfojtik
    Contributor

    @bparees the fact the Pod is already in terminating and even transition from non-ready to ready in terminating state is pretty weird :)

  6. mfojtik commented on Feb 22, 2017

    @mfojtik
    Contributor

    Here are more logs:

    I0211 09:01:10.178646   20718 replication_controller_utils.go:58] Updating replica count for rc: test/frontend-1, replicas 0->0 (need 0), fullyLabeledReplicas 0->0, readyReplicas 0->0, availableReplicas 0->0, sequence No: 0->1
    ...
    I0211 09:01:10.185195   20718 controller_utils.go:158] Controller test/frontend-1 either never recorded expectations, or the ttl expired.
    ...
    I0211 09:01:10.206008   20718 controller.go:225] Updated deployment test/frontend-1 status from New to Pending (scale: 0)
    ....
    E0211 09:01:10.207713   20718 controller.go:169] Failing deployment "test/frontend-1" because its deployer pod "frontend-1-deploy" disappeared
    ...
    I0211 09:01:10.229087   20718 controller.go:225] Updated deployment test/frontend-1 status from Pending to Failed (scale: 0)
    ...
    I0211 09:01:15.235521   20718 replication_controller_utils.go:58] Updating replica count for rc: test/frontend-1, replicas 0->0 (need 2), fullyLabeledReplicas 0->0, readyReplicas 0->0, availableReplicas 0->0, sequence No: 1->2
    ...
    I0211 09:01:15.235642   20718 scheduler.go:93] Attempting to schedule pod: test/frontend-1-22h75
    ...
    I0211 09:01:15.236139   20718 pet_set.go:160] Pod frontend-1-22h75 created, labels: map[name:frontend deployment:frontend-1 deploymentconfig:frontend]
    ...
    I0211 09:01:49.105932   20718 docker_manager.go:1578] Container "80a1bb71793122343e1e4cb81244bd2d357518b680e3027ac2b09bd27853c617 test/frontend-1-22h75" exited after 461.418856ms
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -> seem less then 1s
    ....
     Pod test/frontend-1-22h75 deleted through github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/controller/replicaset.(*ReplicaSetController).updatePod
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -> WHY replicaset controller touched this pod?
    ...
    
  7. mfojtik commented on Feb 22, 2017

    @mfojtik
    Contributor

    @Kargakis why is replicaset controller deleting pods that does not belong to replica set :-) ?

  8. 0xmichalis commented on Feb 22, 2017

    @0xmichalis
    Contributor

    it also looks like immediately after the pod "terminates" it shows up as "running" (???)

    Terminating pods are running pods

  9. 0xmichalis commented on Feb 22, 2017

    @0xmichalis
    Contributor

    @Kargakis why is replicaset controller deleting pods that does not belong to replica set :-) ?

    Make sure the rs/rc controllers have the garbageCollectorEnabled option set to true so they use owner references, otherwise a pod that is selected by any controller is going to be managed by any controller.

  10. added this to the milestone on Feb 27, 2017
  11. mfojtik commented on Feb 27, 2017

    @mfojtik
    Contributor

    Adding 1.6.0 as we opt-ed out fixing this bug for 3.5.

  12. mfojtik commented on Mar 24, 2017

    @mfojtik
    Contributor

    @sttts @ncdc are we enabling GC controller in 1.6 rebase?

  13. 0xmichalis commented on Mar 24, 2017

    @0xmichalis
    Contributor

    @sttts @ncdc are we enabling GC controller in 1.6 rebase?

    Shouldn't matter for this test, the controllers will set owner refs unconditionally in 1.6

  14. mfojtik commented on Apr 19, 2017

    @mfojtik
    Contributor

    Bumping prio as this is not 3.6 blocker, but we should verify that garbageCollectorEnabled is set to true for these controllers and the garbage collector runs @sttts

  15. 0xmichalis commented on Apr 19, 2017

    @0xmichalis
    Contributor

    The option is removed in 3.6 so we should get the owner refs for free

  16. mfojtik commented on Jul 12, 2017

    @mfojtik
    Contributor

    Garbage collection is now enabled by default and this haven't reccured recently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

component/appscomponent/containerskind/test-flakepriority/P2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions