Verify running mirror pod has running containers

This commit is contained in:
Derek Carr 2020-08-25 12:03:00 -04:00
parent 4db3a096ce
commit d2c78b6589

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)
}