From ac7ee5da9fc4fb0a8804ee3cbc17854cd50dda36 Mon Sep 17 00:00:00 2001 From: Maciej Borsz Date: Fri, 17 Aug 2018 15:39:51 +0200 Subject: [PATCH] Fix framework.WaitForDaemonSets: * when daemonsets are not ready, wait for really them * swap parameters in Logf so that they are more readable. --- test/e2e/framework/util.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/e2e/framework/util.go b/test/e2e/framework/util.go index 92e2fcfd2fe..7e5f9657532 100644 --- a/test/e2e/framework/util.go +++ b/test/e2e/framework/util.go @@ -752,14 +752,15 @@ func WaitForDaemonSets(c clientset.Interface, ns string, allowedNotReadyNodes in } var notReadyDaemonSets []string for _, ds := range dsList.Items { - Logf("%d / %d pods ready in namespace '%s' in daemonset '%s' (%d seconds elapsed)", ds.Status.DesiredNumberScheduled, ds.Status.NumberReady, ns, ds.ObjectMeta.Name, int(time.Since(start).Seconds())) + Logf("%d / %d pods ready in namespace '%s' in daemonset '%s' (%d seconds elapsed)", ds.Status.NumberReady, ds.Status.DesiredNumberScheduled, ns, ds.ObjectMeta.Name, int(time.Since(start).Seconds())) if ds.Status.DesiredNumberScheduled-ds.Status.NumberReady > allowedNotReadyNodes { notReadyDaemonSets = append(notReadyDaemonSets, ds.ObjectMeta.Name) } } if len(notReadyDaemonSets) > 0 { - return false, fmt.Errorf("there are not ready daemonsets: %v", notReadyDaemonSets) + Logf("there are not ready daemonsets: %v", notReadyDaemonSets) + return false, nil } return true, nil