Skip to content

Commit

Permalink
Merge pull request #26207 from zmerlynn/fix-unneeded-updated
Browse files Browse the repository at this point in the history
nodecontroller: Fix log message on successful update
  • Loading branch information
a-robinson committed May 27, 2016
2 parents 4047ca1 + cb69960 commit 7522389
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/controller/node/nodecontroller.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,9 @@ func (nc *NodeController) allocateOrOccupyCIDR(obj interface{}) {
glog.V(4).Infof("Assigning node %s CIDR %s", node.Name, podCIDR)
for rep := 0; rep < podCIDRUpdateRetry; rep++ {
node.Spec.PodCIDR = podCIDR.String()
if _, err := nc.kubeClient.Core().Nodes().Update(node); err == nil {
glog.Errorf("Failed while updating Node.Spec.PodCIDR : %v", err)
if _, err := nc.kubeClient.Core().Nodes().Update(node); err != nil {
glog.Errorf("Failed while updating Node.Spec.PodCIDR (%d retries left): %v", podCIDRUpdateRetry-rep-1, err)
} else {
break
}
node, err = nc.kubeClient.Core().Nodes().Get(node.Name)
Expand Down

0 comments on commit 7522389

Please sign in to comment.