From 5ce90c31c9ba050b268cc0ee64241d72c6878ae3 Mon Sep 17 00:00:00 2001 From: "Tim St. Clair" Date: Thu, 7 Jan 2016 16:54:10 -0800 Subject: [PATCH] Treat pod NotFound errors as permanent When waiting for a pod to become running, a NotFound error should be treated a permanent, and report the NotFound error rather than a timeout error. --- test/e2e/util.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/e2e/util.go b/test/e2e/util.go index 878d292cd4f..088d7670b94 100644 --- a/test/e2e/util.go +++ b/test/e2e/util.go @@ -525,6 +525,10 @@ func waitForPodCondition(c *client.Client, ns, podName, desc string, timeout tim for start := time.Now(); time.Since(start) < timeout; time.Sleep(poll) { pod, err := c.Pods(ns).Get(podName) if err != nil { + if apierrs.IsNotFound(err) { + Logf("Pod %q in namespace %q disappeared. Error: %v", podName, ns, err) + return err + } // Aligning this text makes it much more readable Logf("Get pod %[1]s in namespace '%[2]s' failed, ignoring for %[3]v. Error: %[4]v", podName, ns, poll, err)