Skip to content

Commit

Permalink
Fix sync labels and taints error
Browse files Browse the repository at this point in the history
  • Loading branch information
galal-hussein authored and Alena Prokharchyk committed Jun 26, 2018
1 parent 50e3ce9 commit d1e0356
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions k8s/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ func SyncLabels(k8sClient *kubernetes.Clientset, nodeName string, toAddLabels, t
func SyncTaints(k8sClient *kubernetes.Clientset, nodeName string, toAddTaints, toDelTaints []string) error {
updated := false
var err error
var node *v1.Node
for retries := 0; retries <= 5; retries++ {
if err = doSyncTaints(k8sClient, nodeName, toAddTaints, toDelTaints); err != nil {
time.Sleep(5 * time.Second)
Expand All @@ -158,7 +157,7 @@ func SyncTaints(k8sClient *kubernetes.Clientset, nodeName string, toAddTaints, t
break
}
if !updated {
return fmt.Errorf("Timeout waiting for node [%s] to be updated with new set of taints: %v", node.Name, err)
return fmt.Errorf("Timeout waiting for node [%s] to be updated with new set of taints: %v", nodeName, err)
}
return nil
}
Expand Down

0 comments on commit d1e0356

Please sign in to comment.