From 426dd790fb81face438b41dd3d1f56660a6b8ef6 Mon Sep 17 00:00:00 2001 From: vie-serendipity <2733147505@qq.com> Date: Thu, 27 Jul 2023 14:57:03 +0800 Subject: [PATCH] modify --- test/e2e/cmd/init/converter.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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 }) }