mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Add debugging message to know the pod status
The log of a flake test says "Pod did not start running: timed out waiting for the condition" but it is hard to know what is actual status of the pod. So this adds debugging message to know that.
This commit is contained in:
parent
a1364be012
commit
99c2e74a23
@ -184,10 +184,13 @@ func podRunningAndReady(c clientset.Interface, podName, namespace string) wait.C
|
||||
}
|
||||
switch pod.Status.Phase {
|
||||
case v1.PodFailed, v1.PodSucceeded:
|
||||
e2elog.Logf("The status of Pod %s is %s which is unexpected", podName, pod.Status.Phase)
|
||||
return false, conditions.ErrPodCompleted
|
||||
case v1.PodRunning:
|
||||
e2elog.Logf("The status of Pod %s is %s (Ready = %v)", podName, pod.Status.Phase, podutil.IsPodReady(pod))
|
||||
return podutil.IsPodReady(pod), nil
|
||||
}
|
||||
e2elog.Logf("The status of Pod %s is %s, waiting for it to be Running (with Ready = true)", podName, pod.Status.Phase)
|
||||
return false, nil
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user