Change:
return gracePeriod, observedReadyCondition, currentReadyCondition, err } <del> func (nc *NodeController) checkForNodeAddedDeleted(nodes []*v1.Node) (added, deleted []*v1.Node) { for i := range nodes { if _, has := nc.knownNodeSet[nodes[i].Name]; !has { added = append(added, nodes[i]) </del> <ins> // classifyNodes classifies the allNodes to three categories: //   1. added: the nodes that in 'allNodes', but not in 'knownNodeSet' //   2. deleted: the nodes that in 'knownNodeSet', but not in 'allNodes' //   3. newZoneRepresentatives: the nodes that in both 'knownNodeSet' and 'allNodes', but no zone states func (nc *NodeController) classifyNodes(allNodes []*v1.Node) (added, deleted, newZoneRepresentatives []*v1.Node) { for i := range allNodes { if _, has := nc.knownNodeSet[allNodes[i].Name]; !has { added = append(added, allNodes[i]) } else { // Currently, we only consider new zone as updated. zone := utilnode.GetZoneKey(allNodes[i]) if _, found := nc.zoneStates[zone]; !found { newZoneRepresentatives = append(newZoneRepresentatives, allNodes[i]) } </ins> } } // If there's a difference between lengths of known Nodes and observed nodes // we must have removed some Node. <del> if len(nc.knownNodeSet)+len(added) != len(nodes) { </del> <ins> if len(nc.knownNodeSet)+len(added) != len(allNodes) { </ins> knowSetCopy := map[string]*v1.Node{} for k, v := range nc.knownNodeSet { knowSetCopy[k] = v } <del> for i := range nodes { delete(knowSetCopy, nodes[i].Name) </del> <ins> for i := range allNodes { delete(knowSetCopy, allNodes[i].Name) </ins> } for i := range knowSetCopy { deleted = append(deleted, knowSetCopy[i])

Discussion:
<!-- If this is a BUG REPORT, please: Fill in as much of the template below as you can. If you leave out information, we can't help you as well. If this is a FEATURE REQUEST, please: Describe in detail the feature/behavior/change you'd like to see. In both cases, be ready for followup questions, and please respond in a timely manner. If we can't reproduce a bug or think a feature already exists, we might close your issue. If we're wrong, PLEASE feel free to reopen it and explain why. --Kubernetes version (use ): Client Version: version.Info{Major:"1", Minor:"8+", GitVersion:"v1.8.0-alpha.1.51+-dirty", GitCommit:"", GitTreeState:"dirty", BuildDate:"2017-06-20T10:51:10Z", GoVersion:"go1.8", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"8+", GitVersion:"v1.8.0-alpha.1.51+-dirty", GitCommit:"", GitTreeState:"dirty", BuildDate:"2017-06-20T11:29:14Z", GoVersion:"go1.8", Compiler:"gc", Platform:"linux/amd64"} What happened: After adding label to a node, node controller panics. What you expected to happen: Everything should still work. How to reproduce it (as minimally and precisely as possible): Run and wait for the node controller to panic: Anything else we need to know: I've checked the code and it looks like the node controller expects the label to be present during node registration and it can not be later. Even if the label can not be latter it shouldn't panic.
/sig node
There are no sig labels on this issue. Please by:<br(1) mentioning a sig: <br(2) specifying the label manually: <br<brNote: method (1) will trigger a notification to the team. You can find the team list and label list
/assign let me try this :).