Skip to content

TestKubeletConfigCreate flake? #417

Closed

Description

@runcom

This test fails from time to time, let's track it down

--- FAIL: TestKubeletConfigCreate (0.12s)
    --- PASS: TestKubeletConfigCreate/aws (0.10s)
    --- FAIL: TestKubeletConfigCreate/none (0.01s)
    	kubelet_config_controller_test.go:207: Expected
    			testing.CreateActionImpl{ActionImpl:testing.ActionImpl{Namespace:"", Verb:"create", Resource:schema.GroupVersionResource{Group:"", Version:"", Resource:"machineconfigs"}, Subresource:""}, Name:"", Object:(*v1.MachineConfig)(0xc4202f3180)}
    		got
    			testing.UpdateActionImpl{ActionImpl:testing.ActionImpl{Namespace:"", Verb:"update", Resource:schema.GroupVersionResource{Group:"machineconfiguration.openshift.io", Version:"v1", Resource:"kubeletconfigs"}, Subresource:"status"}, Object:(*v1.KubeletConfig)(0xc4202f0780)}
    	kubelet_config_controller_test.go:176: 2 additional expected actions:[{ActionImpl:{Namespace: Verb:patch Resource:{Group:machineconfiguration.openshift.io Version:v1 Resource:kubeletconfigs} Subresource:} Name:smaller-max-pods Patch:[123 34 109 101 116 97 100 97 116 97 34 58 123 34 102 105 110 97 108 105 122 101 114 115 34 58 91 34 57 57 45 109 97 115 116 101 114 45 104 53 53 50 109 45 115 109 97 108 108 101 114 45 109 97 120 45 112 111 100 115 45 107 117 98 101 108 101 116 34 93 125 125]} {ActionImpl:{Namespace: Verb:update Resource:{Group:machineconfiguration.openshift.io Version:v1 Resource:kubeletconfigs} Subresource:status} Object:0xc420133900}]
--- FAIL: TestKubeletConfigUpdates (0.17s)
    --- PASS: TestKubeletConfigUpdates/aws (0.07s)
    --- PASS: TestKubeletConfigUpdates/none (0.05s)
    --- FAIL: TestKubeletConfigUpdates/unrecognized (0.05s)
    	kubelet_config_controller_test.go:213: Expected
    			testing.GetActionImpl{ActionImpl:testing.ActionImpl{Namespace:"", Verb:"get", Resource:schema.GroupVersionResource{Group:"", Version:"", Resource:"machineconfigs"}, Subresource:""}, Name:"99-master-p9l4d-kubelet"}
    		got
    			testing.UpdateActionImpl{ActionImpl:testing.ActionImpl{Namespace:"", Verb:"update", Resource:schema.GroupVersionResource{Group:"machineconfiguration.openshift.io", Version:"v1", Resource:"kubeletconfigs"}, Subresource:"status"}, Object:(*v1.KubeletConfig)(0xc4203b1b80)}
    	kubelet_config_controller_test.go:76: 3 additional expected actions:[{ActionImpl:{Namespace: Verb:create Resource:{Group: Version: Resource:machineconfigs} Subresource:} Name: Object:0xc42003cf00} {ActionImpl:{Namespace: Verb:patch Resource:{Group:machineconfiguration.openshift.io Version:v1 Resource:kubeletconfigs} Subresource:} Name:smaller-max-pods Patch:[123 34 109 101 116 97 100 97 116 97 34 58 123 34 102 105 110 97 108 105 122 101 114 115 34 58 91 34 57 57 45 109 97 115 116 101 114 45 104 53 53 50 109 45 115 109 97 108 108 101 114 45 109 97 120 45 112 111 100 115 45 107 117 98 101 108 101 116 34 93 125 125]} {ActionImpl:{Namespace: Verb:update Resource:{Group:machineconfiguration.openshift.io Version:v1 Resource:kubeletconfigs} Subresource:status} Object:0xc4203b0f00}]

Activity

  1. runcom commented on Feb 12, 2019

    @runcom
    MemberAuthor
  2. ashcrow commented on Feb 12, 2019

    @ashcrow
    Member

    Example: #415

  3. added a commit that references this issue on Feb 15, 2019
    57ff65d
  4. changed the title [-]TestKubeletConfigCreate/none flake?[/-] [+]TestKubeletConfigCreate flake?[/+] on Feb 17, 2019
  5. runcom commented on Feb 17, 2019

    @runcom
    MemberAuthor

    this is still happening @rphillips https://openshift-gce-devel.appspot.com/build/origin-ci-test/pr-logs/pull/openshift_machine-config-operator/446/pull-ci-openshift-machine-config-operator-master-unit/1182

    -- FAIL: TestKubeletConfigUpdates (0.17s)
        --- PASS: TestKubeletConfigUpdates/aws (0.07s)
        --- PASS: TestKubeletConfigUpdates/none (0.05s)
        --- FAIL: TestKubeletConfigUpdates/unrecognized (0.05s)
        	kubelet_config_controller_test.go:213: Expected
        			testing.GetActionImpl{ActionImpl:testing.ActionImpl{Namespace:"", Verb:"get", Resource:schema.GroupVersionResource{Group:"", Version:"", Resource:"machineconfigs"}, Subresource:""}, Name:"99-master-p9l4d-kubelet"}
        		got
        			testing.UpdateActionImpl{ActionImpl:testing.ActionImpl{Namespace:"", Verb:"update", Resource:schema.GroupVersionResource{Group:"machineconfiguration.openshift.io", Version:"v1", Resource:"kubeletconfigs"}, Subresource:"status"}, Object:(*v1.KubeletConfig)(0xc4203b1b80)}
        	kubelet_config_controller_test.go:76: 3 additional expected actions:[{ActionImpl:{Namespace: Verb:create Resource:{Group: Version: Resource:machineconfigs} Subresource:} Name: Object:0xc42003cf00} {ActionImpl:{Namespace: Verb:patch Resource:{Group:machineconfiguration.openshift.io Version:v1 Resource:kubeletconfigs} Subresource:} Name:smaller-max-pods Patch:[123 34 109 101 116 97 100 97 116 97 34 58 123 34 102 105 110 97 108 105 122 101 114 115 34 58 91 34 57 57 45 109 97 115 116 101 114 45 104 53 53 50 109 45 115 109 97 108 108 101 114 45 109 97 120 45 112 111 100 115 45 107 117 98 101 108 101 116 34 93 125 125]} {ActionImpl:{Namespace: Verb:update Resource:{Group:machineconfiguration.openshift.io Version:v1 Resource:kubeletconfigs} Subresource:status} Object:0xc4203b0f00}]
    
  6. runcom commented on Feb 18, 2019

    @runcom
    MemberAuthor

    Ok found out what's happening in tests at least, all the *Lister in the tests are racy or logic is flawed somewhere and can result in object not being properly listed after being added. Placed some debug and I can confirm that running with -race shows me that behavior:

    == RUN   TestKubeletConfigUpdates/aws
    runcom <nil> []runcom <nil> []=== RUN   TestKubeletConfigUpdates/none
    runcom <nil> []runcom could not find any MachineConfigPool set for KubeletConfig smaller-max-pods []=== RUN   TestKubeletConfigUpdates/unrecognized
    runcom <nil> []runcom <nil> []--- FAIL: TestKubeletConfigUpdates (0.59s)
        --- PASS: TestKubeletConfigUpdates/aws (0.22s)
        --- FAIL: TestKubeletConfigUpdates/none (0.13s)
            kubelet_config_controller_test.go:213: Expected
                	testing.GetActionImpl{ActionImpl:testing.ActionImpl{Namespace:"", Verb:"get", Resource:schema.GroupVersionResource{Group:"", Version:"", Resource:"machineconfigs"}, Subresource:""}, Name:"99-master-5fvff-kubelet"}
                got
                	testing.UpdateActionImpl{ActionImpl:testing.ActionImpl{Namespace:"", Verb:"update", Resource:schema.GroupVersionResource{Group:"machineconfiguration.openshift.io", Version:"v1", Resource:"kubeletconfigs"}, Subresource:"status"}, Object:(*v1.KubeletConfig)(0xc0002c2280)}
            kubelet_config_controller_test.go:76: 3 additional expected actions:[{ActionImpl:{Namespace: Verb:update Resource:{Group: Version: Resource:machineconfigs} Subresource:} Object:0xc00011d900} {ActionImpl:{Namespace: Verb:patch Resource:{Group:machineconfiguration.openshift.io Version:v1 Resource:kubeletconfigs} Subresource:} Name:smaller-max-pods Patch:[123 34 109 101 116 97 100 97 116 97 34 58 123 34 102 105 110 97 108 105 122 101 114 115 34 58 91 34 57 57 45 109 97 115 116 101 114 45 109 119 119 116 103 45 107 117 98 101 108 101 116 34 93 125 125]} {ActionImpl:{Namespace: Verb:update Resource:{Group:machineconfiguration.openshift.io Version:v1 Resource:kubeletconfigs} Subresource:status} Object:0xc0002c2f00}]
    

    you can see the mcpLister failed to give back the expected object (see logs with "runcom " in them)

  7. runcom commented on Feb 18, 2019

    @runcom
    MemberAuthor

    the informers store can also have bad data as a result of either a bug in test or code

  8. runcom commented on Feb 18, 2019

    @runcom
    MemberAuthor

    Reopening since we still get this

  9. reopened this on Feb 18, 2019
  10. sjenning commented on Feb 18, 2019

    @sjenning
    Contributor

    /assign @rphillips

  11. runcom commented on Feb 19, 2019

    @runcom
    MemberAuthor

    I know what's happening, the listers for the mcp and the controllerconfig aren't in sync by the time we call syncHandler in tests and return an empty list which makes the syncHandler call syncStatusOnly which in turns call an unexpected (for the test) update action. I don't understand why the listers aren't in sync, they're just a store with a map and rwlock but there's no parallelism involved afaict.

  12. added a commit that references this issue on Feb 26, 2019
  13. kikisdeliveryservice commented on Mar 28, 2019

    @kikisdeliveryservice
    Contributor

    @runcom I think I'm actually seeing this flake in my PR today:

    
    TestKubeletConfigCreate (1.06s)
        --- FAIL: TestKubeletConfigCreate/aws (0.37s)
        	kubelet_config_controller_test.go:251: Expected
        			testing.CreateActionImpl{ActionImpl:testing.ActionImpl{Namespace:"", Verb:"create", Resource:schema.GroupVersionResource{Group:"", Version:"", Resource:"machineconfigs"}, Subresource:""}, Name:"", Object:(*v1.MachineConfig)(0xc420408a00)}
        		got
        			testing.UpdateActionImpl{ActionImpl:testing.ActionImpl{Namespace:"", Verb:"update", Resource:schema.GroupVersionResource{Group:"machineconfiguration.openshift.io", Version:"v1", Resource:"kubeletconfigs"}, Subresource:"status"}, Object:(*v1.KubeletConfig)(0xc420132500)}
        	kubelet_config_controller_test.go:84: 2 additional expected actions:[{ActionImpl:{Namespace: Verb:patch Resource:{Group:machineconfiguration.openshift.io Version:v1 Resource:kubeletconfigs} Subresource:} Name:smaller-max-pods Patch:[123 34 109 101 116 97 100 97 116 97 34 58 123 34 102 105 110 97 108 105 122 101 114 115 34 58 91 34 57 57 45 109 97 115 116 101 114 45 104 53 53 50 109 45 115 109 97 108 108 101 114 45 109 97 120 45 112 111 100 115 45 107 117 98 101 108 101 116 34 93 125 125]} {ActionImpl:{Namespace: Verb:update Resource:{Group:machineconfiguration.openshift.io Version:v1 Resource:kubeletconfigs} Subresource:status} Object:0xc42041adc0}]
        --- FAIL: TestKubeletConfigCreate/none (0.35s)
    
    

    https://openshift-gce-devel.appspot.com/build/origin-ci-test/pr-logs/pull/openshift_machine-config-operator/583/pull-ci-openshift-machine-config-operator-master-unit/1752

  14. runcom commented on Mar 28, 2019

    @runcom
    MemberAuthor

    #583 (comment)

    this is not happening anymore as a flake, just a test failure unrelated but related to ignition transition

  15. added 2 commits that reference this issue on May 15, 2026
    a55c4bd
    7f7c808
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions