Renamed doTaintingPass to doNoExecuteTaintingPass.

This commit is contained in:
Klaus Ma 2017-07-31 19:47:57 +08:00
parent 678947d431
commit e89e01d063
2 changed files with 4 additions and 4 deletions

View File

@ -434,7 +434,7 @@ func (nc *NodeController) doEvictionPass() {
} }
} }
func (nc *NodeController) doTaintingPass() { func (nc *NodeController) doNoExecuteTaintingPass() {
nc.evictorLock.Lock() nc.evictorLock.Lock()
defer nc.evictorLock.Unlock() defer nc.evictorLock.Unlock()
for k := range nc.zoneNoExecuteTainer { for k := range nc.zoneNoExecuteTainer {
@ -498,7 +498,7 @@ func (nc *NodeController) Run(stopCh <-chan struct{}) {
if nc.useTaintBasedEvictions { if nc.useTaintBasedEvictions {
// Handling taint based evictions. Because we don't want a dedicated logic in TaintManager for NC-originated // Handling taint based evictions. Because we don't want a dedicated logic in TaintManager for NC-originated
// taints and we normally don't rate limit evictions caused by taints, we need to rate limit adding taints. // taints and we normally don't rate limit evictions caused by taints, we need to rate limit adding taints.
go wait.Until(nc.doTaintingPass, nodeEvictionPeriod, wait.NeverStop) go wait.Until(nc.doNoExecuteTaintingPass, nodeEvictionPeriod, wait.NeverStop)
} else { } else {
// Managing eviction of nodes: // Managing eviction of nodes:
// When we delete pods off a node, if the node was not empty at the time we then // When we delete pods off a node, if the node was not empty at the time we then

View File

@ -2005,7 +2005,7 @@ func TestSwapUnreachableNotReadyTaints(t *testing.T) {
if err := nodeController.monitorNodeStatus(); err != nil { if err := nodeController.monitorNodeStatus(); err != nil {
t.Errorf("unexpected error: %v", err) t.Errorf("unexpected error: %v", err)
} }
nodeController.doTaintingPass() nodeController.doNoExecuteTaintingPass()
node0, err := fakeNodeHandler.Get("node0", metav1.GetOptions{}) node0, err := fakeNodeHandler.Get("node0", metav1.GetOptions{})
if err != nil { if err != nil {
@ -2043,7 +2043,7 @@ func TestSwapUnreachableNotReadyTaints(t *testing.T) {
if err := nodeController.monitorNodeStatus(); err != nil { if err := nodeController.monitorNodeStatus(); err != nil {
t.Errorf("unexpected error: %v", err) t.Errorf("unexpected error: %v", err)
} }
nodeController.doTaintingPass() nodeController.doNoExecuteTaintingPass()
node0, err = fakeNodeHandler.Get("node0", metav1.GetOptions{}) node0, err = fakeNodeHandler.Get("node0", metav1.GetOptions{})
if err != nil { if err != nil {