Merge pull request #94229 from derekwaynecarr/verify-container-state-running

Verify running mirror pod has running containers
This commit is contained in:
Kubernetes Prow Robot 2020-08-28 22:15:19 -07:00 committed by GitHub
commit 2ca9ee3928
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -192,6 +192,11 @@ func checkMirrorPodRunning(cl clientset.Interface, name, namespace string) error
if pod.Status.Phase != v1.PodRunning {
return fmt.Errorf("expected the mirror pod %q to be running, got %q", name, pod.Status.Phase)
}
for i := range pod.Status.ContainerStatuses {
if pod.Status.ContainerStatuses[i].State.Running == nil {
return fmt.Errorf("expected the mirror pod %q with container %q to be running", name, pod.Status.ContainerStatuses[i].Name)
}
}
return validateMirrorPod(cl, pod)
}