From d1e0356bafc3a27d8fe7fc8fee4cee55fab3ed05 Mon Sep 17 00:00:00 2001 From: galal-hussein Date: Tue, 26 Jun 2018 21:27:25 +0200 Subject: [PATCH] Fix sync labels and taints error --- k8s/node.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/k8s/node.go b/k8s/node.go index 47581ff9c..2960aa324 100644 --- a/k8s/node.go +++ b/k8s/node.go @@ -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) @@ -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 }