From 31bf75c116d774f69598dda0cf2f0e2c55d1283f Mon Sep 17 00:00:00 2001 From: Jacob Gillespie Date: Mon, 21 May 2018 09:16:36 -0500 Subject: [PATCH 1/2] Fix running e2e tests with completed kube-system pods --- test/e2e/framework/util.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/e2e/framework/util.go b/test/e2e/framework/util.go index a3d99d92c20..73dc9de60ff 100644 --- a/test/e2e/framework/util.go +++ b/test/e2e/framework/util.go @@ -704,10 +704,8 @@ func WaitForPodsRunningReady(c clientset.Interface, ns string, minPods, allowedN case res && err == nil: nOk++ case pod.Status.Phase == v1.PodSucceeded: - Logf("The status of Pod %s is Succeeded which is unexpected", pod.ObjectMeta.Name) - badPods = append(badPods, pod) - // it doesn't make sense to wait for this pod - return false, errors.New("unexpected Succeeded pod state") + // pod status is succeeded, it doesn't make sense to wait for this pod + continue case pod.Status.Phase != v1.PodFailed: Logf("The status of Pod %s is %s (Ready = false), waiting for it to be either Running (with Ready = true) or Failed", pod.ObjectMeta.Name, pod.Status.Phase) notReady++ From 98bc39dcd5fd384bc03b62fce9029b452aecae90 Mon Sep 17 00:00:00 2001 From: Jacob Gillespie Date: Tue, 22 May 2018 12:40:20 -0700 Subject: [PATCH 2/2] Add Logf message for skipped succeeded pods --- test/e2e/framework/util.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/e2e/framework/util.go b/test/e2e/framework/util.go index 73dc9de60ff..4373d970701 100644 --- a/test/e2e/framework/util.go +++ b/test/e2e/framework/util.go @@ -704,7 +704,8 @@ func WaitForPodsRunningReady(c clientset.Interface, ns string, minPods, allowedN case res && err == nil: nOk++ case pod.Status.Phase == v1.PodSucceeded: - // pod status is succeeded, it doesn't make sense to wait for this pod + Logf("The status of Pod %s is Succeeded, skipping waiting", pod.ObjectMeta.Name) + // it doesn't make sense to wait for this pod continue case pod.Status.Phase != v1.PodFailed: Logf("The status of Pod %s is %s (Ready = false), waiting for it to be either Running (with Ready = true) or Failed", pod.ObjectMeta.Name, pod.Status.Phase)