Merge pull request #49608 from guangxuli/fix_nodestatus_update_prints

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

The printing level for node updated failed info should be used WARNING type

**What this PR does / why we need it**:

when I add the new node to the currnent kubernetes cluster, the kube-controller-manager always outputs the error msg( `Failed to set statusUpdateNeeded to needed true because nodeName="openpass-215"  does not exist)` and (`Failed to update statusUpdateNeeded field in actual state of world: Failed to set statusUpdateNeeded to needed true because nodeName="openpass-215"  does not exist`). 

The results of invocation `updateNodeStatusUpdateNeeded` have two context, normal and abnormal.
The normal context is adding a new node to the cluster, the abnormal context is really exist some errors.

The printing level is confusing because it awlays outputs the error level msg.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

none

/cc @saad-ali
pull/6/head
Kubernetes Submit Queue 2017-12-14 14:58:11 -08:00 committed by GitHub
commit e87d8511b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -488,7 +488,7 @@ func (asw *actualStateOfWorld) SetNodeStatusUpdateNeeded(nodeName types.NodeName
asw.Lock()
defer asw.Unlock()
if err := asw.updateNodeStatusUpdateNeeded(nodeName, true); err != nil {
glog.Errorf("Failed to update statusUpdateNeeded field in actual state of world: %v", err)
glog.Warningf("Failed to update statusUpdateNeeded field in actual state of world: %v", err)
}
}