mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
[e2epod] wait: Don't override non-timeout errors
This commit is contained in:
parent
55ec0f2d9d
commit
b289c23394
@ -276,14 +276,15 @@ func WaitForPodCondition(c clientset.Interface, ns, podName, conditionDesc strin
|
|||||||
if err == nil {
|
if err == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if IsTimeout(err) && lastPod != nil {
|
if IsTimeout(err) {
|
||||||
return TimeoutError(fmt.Sprintf("timed out while waiting for pod %s to be %s", podIdentifier(ns, podName), conditionDesc),
|
if lastPod != nil {
|
||||||
lastPod,
|
return TimeoutError(fmt.Sprintf("timed out while waiting for pod %s to be %s", podIdentifier(ns, podName), conditionDesc),
|
||||||
)
|
lastPod,
|
||||||
}
|
)
|
||||||
if lastPodError != nil {
|
} else if lastPodError != nil {
|
||||||
// If the last API call was an error.
|
// If the last API call was an error, propagate that instead of the timeout error.
|
||||||
err = lastPodError
|
err = lastPodError
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return maybeTimeoutError(err, "waiting for pod %s to be %s", podIdentifier(ns, podName), conditionDesc)
|
return maybeTimeoutError(err, "waiting for pod %s to be %s", podIdentifier(ns, podName), conditionDesc)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user