diff --git a/test/e2e/cmd/init/converter.go b/test/e2e/cmd/init/converter.go index 15fbd0f3879..9108248b90e 100644 --- a/test/e2e/cmd/init/converter.go +++ b/test/e2e/cmd/init/converter.go @@ -284,20 +284,20 @@ func (c *ClusterConverter) deployYurtManager() error { } if podList.Items[0].Status.Phase == corev1.PodRunning { - if podList.Items[0].Status.ContainerStatuses[0].Ready == false { - klog.Info("yurt manager's container is not ready") - return false, nil - } for i := range podList.Items[0].Status.Conditions { if podList.Items[0].Status.Conditions[i].Type == corev1.PodReady && - podList.Items[0].Status.Conditions[i].Status == corev1.ConditionTrue { - klog.Info("yurt manager's container and pod are both ready") - return true, nil + podList.Items[0].Status.Conditions[i].Status != corev1.ConditionTrue { + klog.Infof("pod(%s/%s): %#v", podList.Items[0].Namespace, podList.Items[0].Name, podList.Items[0]) + return false, nil + } + if podList.Items[0].Status.Conditions[i].Type == corev1.ContainersReady && + podList.Items[0].Status.Conditions[i].Status != corev1.ConditionTrue { + klog.Info("yurt manager's container is not ready") + return false, nil } } } - klog.Infof("pod(%s/%s): %#v", podList.Items[0].Namespace, podList.Items[0].Name, podList.Items[0]) - return false, nil + return true, nil }) }