Skip to content

Kubelet loops endlessly looking at run once pods #1656

Closed

Description

@smarterclayton

Created a number of run once pods that ran to completion, then restarted the all-in-one. The Kubelet appears to be looping (seeing the pods, that are complete) without ignoring them forever like it should.

E0408 19:53:25.715639   27154 event.go:129] Unable to write event '&api.Event{TypeMeta:api.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:api.ObjectMeta{Name:"deploy-database-18pgcs.13d321db1e02a875", GenerateName:"", Namespace:"default", SelfLink:"", UID:"", ResourceVersion:"19723", CreationTimestamp:util.Time{Time:time.Time{sec:0, nsec:0x0, loc:(*time.Location)(nil)}}, DeletionTimestamp:(*util.Time)(nil), Labels:map[string]string(nil), Annotations:map[string]string(nil)}, InvolvedObject:api.ObjectReference{Kind:"Pod", Namespace:"default", Name:"deploy-database-18pgcs", UID:"13407227-de0f-11e4-9cef-080027c5bfa9", APIVersion:"v1beta1", ResourceVersion:"371", FieldPath:"spec.containers{deployment}"}, Reason:"failed", Message:"Failed to pull image \"openshift/origin-deployer:v0.4.3\": Tag v0.4.3 not found in repository openshift/origin-deployer", Source:api.EventSource{Component:"kubelet", Host:"openshiftdev.local"}, FirstTimestamp:util.Time{Time:time.Time{sec:63564119531, nsec:0x0, loc:(*time.Location)(0x32de2a0)}}, LastTimestamp:util.Time{Time:time.Time{sec:63564119605, nsec:0x2824e3e9, loc:(*time.Location)(0x32de2a0)}}, Count:25}': 'events "deploy-database-18pgcs.13d321db1e02a875" cannot be updated: 101: Compare failed ([19723 != 19726]) [19726]' (will not retry!)
I0408 19:53:27.941076   27154 kubelet.go:994] Already ran container "sti-build" of pod "ruby-sample-build-5_default", do nothing
I0408 19:53:27.963573   27154 kubelet.go:994] Already ran container "deployment" of pod "deploy-docker-registry-2gk2mm_default", do nothing
I0408 19:53:27.972043   27154 kubelet.go:994] Already ran container "deployment" of pod "deploy-docker-registry-2fcm33_default", do nothing
I0408 19:53:27.976866   27154 kubelet.go:994] Already ran container "sti-build" of pod "ruby-sample-build-6_default", do nothing

Possible there's a bug in Kubelet log where it doesn't properly ignore run-once pods.

Activity

  1. added
    kind/bug
    on Apr 8, 2015
  2. added this to the 0.5.0 (beta3) milestone on Apr 8, 2015
  3. smarterclayton commented on Apr 9, 2015

    @smarterclayton
    ContributorAuthor

    That output is looped over and over

  4. brenton commented on Apr 15, 2015

    @brenton
    Contributor

    @smarterclayton, do we think this will make 0.5.0? While annoying, I don't think it's going to block beta3.

  5. smarterclayton commented on Apr 15, 2015

    @smarterclayton
    ContributorAuthor

    It does not

    On Apr 15, 2015, at 4:22 PM, Brenton Leanhardt [email protected] wrote:

    @smarterclayton, do we think this will make 0.5.0? While annoying, I don't think it's going to block beta3.

    —
    Reply to this email directly or view it on GitHub.

  6. modified the milestones: 0.6.0, 0.5.0 (beta3) on Apr 15, 2015
  7. derekwaynecarr commented on Jun 4, 2015

    @derekwaynecarr
    Member

    Attempting to reproduce this now... the kubelet has changed so much, I cannot find that string in kubelet.go ;-)

  8. derekwaynecarr commented on Jun 4, 2015

    @derekwaynecarr
    Member

    So just looking at this code, this predates changing to the SyncPods loop that ran every 10s in Kubelet.

    The code does filter the list of pods it iterates against here:
    https://github.com/GoogleCloudPlatform/kubernetes/blob/master/pkg/kubelet/kubelet.go#L1322

    Filters the terminated pods here:
    https://github.com/GoogleCloudPlatform/kubernetes/blob/master/pkg/kubelet/kubelet.go#L1591

    So I guess I will just run a bunch of containers to their death and grep logs for anything weird, but this code has definitely improved in the interim from the initial report.

  9. derekwaynecarr commented on Jun 4, 2015

    @derekwaynecarr
    Member

    @smarterclayton - you can close this issue.

    See the analysis I provided on the upstream issue (that I also now closed) here:
    kubernetes/kubernetes#6641

    Net:
    Kubelet filters out terminated pods in its synch loop
    As a result, Kubelet does not constantly update the pod status once its terminated
    As a result, the resource version of a pod is stable once its terminated
    As a result, the watch is not spammed with updates for dead pods

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

Metadata

Metadata

Labels

component/kuberneteskind/bugpriority/P2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions