Merge pull request #14000 from mikedanese/nc_spam

Auto commit by PR queue bot
This commit is contained in:
k8s-merge-robot 2015-09-16 04:45:40 -07:00
commit 75bce0ed8d

View File

@ -571,12 +571,15 @@ func (nc *NodeController) evictPods(nodeName string) bool {
// cancelPodEviction removes any queued evictions, typically because the node is available again. It // cancelPodEviction removes any queued evictions, typically because the node is available again. It
// returns true if an eviction was queued. // returns true if an eviction was queued.
func (nc *NodeController) cancelPodEviction(nodeName string) bool { func (nc *NodeController) cancelPodEviction(nodeName string) bool {
glog.V(2).Infof("Cancelling pod Eviction on Node: %v", nodeName)
nc.evictorLock.Lock() nc.evictorLock.Lock()
defer nc.evictorLock.Unlock() defer nc.evictorLock.Unlock()
wasDeleting := nc.podEvictor.Remove(nodeName) wasDeleting := nc.podEvictor.Remove(nodeName)
wasTerminating := nc.terminationEvictor.Remove(nodeName) wasTerminating := nc.terminationEvictor.Remove(nodeName)
return wasDeleting || wasTerminating if wasDeleting || wasTerminating {
glog.V(2).Infof("Cancelling pod Eviction on Node: %v", nodeName)
return true
}
return false
} }
// deletePods will delete all pods from master running on given node, and return true // deletePods will delete all pods from master running on given node, and return true