提交 5ac8aef3 编写于 作者: T Thomas Stromberg

Retry Pods.List, as it may fails when the apiserver is being rescheduled

上级 279915a3
...@@ -227,9 +227,8 @@ func PodWait(ctx context.Context, t *testing.T, profile string, ns string, selec ...@@ -227,9 +227,8 @@ func PodWait(ctx context.Context, t *testing.T, profile string, ns string, selec
f := func() (bool, error) { f := func() (bool, error) {
pods, err := client.CoreV1().Pods(ns).List(listOpts) pods, err := client.CoreV1().Pods(ns).List(listOpts)
if err != nil { if err != nil {
t.Logf("Pod(%s).List(%v) returned error: %v", ns, selector, err) t.Logf("WARNING: Pod(%s).List(%v) returned error: %v", ns, selector, err)
// Don't bother to retry: something is very wrong. return false, err
return true, err
} }
if len(pods.Items) == 0 { if len(pods.Items) == 0 {
podStart = time.Time{} podStart = time.Time{}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册