Change:
/cc
Is this from head? I've never seen this before, maybe changed anything recently. Anyway, the code in question will be deleted by
I saw this in the Travis run for an unrelated PR (Kubelet test refactoring). If it's going away, then that's ho we'll fix it :)
Yup. It'll go away. I'll assign it to myself - I'll run test few times after to make sure it's gone.
another example: https://travis-
Just hit this again: https://travis-
I was hoping we could finish getting rid of this code this week, which is why I had been ignoring this. But we ran out of time and Poland has a holiday on Monday, so I guess we need to fix this race. I'll take a look.
Thanks. This is becoming a real nuisance that is masking other failures.
To repro I assume I just type the commands from Travis, e.g. the shell stuff in https://travis- ?
Never mind, I got it. Though the first time I ran it all the tests passed.
I don't think the failure is deterministic, but yes.
This is super annoying, it happens way too much of the time...
Sigh, I was hoping we can get rid of the code this week. I think the problem comes from someone changes the event recording. I'll send a PR
It seems to be basically always failing now, except when some other flake fails first.
It would be fine with me if we just temporarily disabled event generation there.
If I'm reading the stack traces correctly, what's going on is that NewNodeController [] calls StartRecordingToSink() [] which calls StartEventWatcher() which calls eventHandler() which calls StartRecordingToSink() which calls sink.Create() which is Create() in , which appends to c.Fake.Actions. At the same time, the last line of the test tries to print "item.fakeNodeHandler.Actions" and these are presumably the same variable. I'm not sure why these are running at the same time, though.
+1 to Braians idea to temporary disable event generation.
Re-titled issue.
Re-titled issue.

Discussion:
"github.com/GoogleCloudPlatform/kubernetes/pkg/api" apierrors "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" "github.com/GoogleCloudPlatform/kubernetes/pkg/client" <ins> "github.com/GoogleCloudPlatform/kubernetes/pkg/client/record" </ins> "github.com/GoogleCloudPlatform/kubernetes/pkg/cloudprovider" "github.com/GoogleCloudPlatform/kubernetes/pkg/labels" <ins> "github.com/GoogleCloudPlatform/kubernetes/pkg/types" </ins> "github.com/GoogleCloudPlatform/kubernetes/pkg/util" "github.com/golang/glog" )

nodes                   []string kubeClient              client.Interface kubeletClient           client.KubeletClient <ins> recorder                record.EventRecorder </ins> registerRetryCount      int podEvictionTimeout      time.Duration deletingPodsRateLimiter util.RateLimiter

nodeMonitorGracePeriod time.Duration, nodeStartupGracePeriod time.Duration, nodeMonitorPeriod time.Duration) *NodeController { <ins> eventBroadcaster := record.NewBroadcaster() recorder := eventBroadcaster.NewRecorder(api.EventSource{Component: "controllermanager"}) if kubeClient != nil { glog.Infof("Sending events to api server.") eventBroadcaster.StartRecordingToSink(kubeClient.Events("")) } else { glog.Infof("No api server defined - no events will be sent to API server.") } </ins> return &NodeController{ cloud:                   cloud, matchRE:                 matchRE,

staticResources:         staticResources, kubeClient:              kubeClient, kubeletClient:           kubeletClient, <ins> recorder:                recorder, </ins> registerRetryCount:      registerRetryCount, podEvictionTimeout:      podEvictionTimeout, deletingPodsRateLimiter: deletingPodsRateLimiter,

return nodes, nil } <ins> func (nc *NodeController) recordNodeEvent(node *api.Node, event string) { ref := &api.ObjectReference{ Kind:      "Node", Name:      node.Name, UID:       types.UID(node.Name), Namespace: "", } glog.V(2).Infof("Recording %s event message for node %s", event, node.Name) // TODO: This requires a transaction, either both node status is updated // and event is recorded or neither should happen, see issue #6055. nc.recorder.Eventf(ref, event, "Node %s is now %s", node.Name, event) } </ins> // For a given node checks its conditions and tries to update it. Returns grace period to which given node // is entitled, state of current and last observed Ready Condition, and an error if it ocured. func (nc *NodeController) tryUpdateNodeStatus(node *api.Node) (time.Duration, api.NodeCondition, *api.NodeCondition, error) {

nc.deletePods(node.Name) } } <ins> // Report node events. if readyCondition.Status == api.ConditionTrue && lastReadyCondition.Status != api.ConditionTrue { nc.recordNodeEvent(node, "ready") } if readyCondition.Status == api.ConditionFalse && lastReadyCondition.Status != api.ConditionFalse { nc.recordNodeEvent(node, "not_ready") } if readyCondition.Status == api.ConditionUnknown && lastReadyCondition.Status != api.ConditionUnknown { nc.recordNodeEvent(node, "unknown") } </ins> } } return nil