From 1ff58a290565eebd27ecd210118660271a6cfc75 Mon Sep 17 00:00:00 2001 From: Tushar Tathgur Date: Tue, 11 Jul 2023 09:32:39 -0700 Subject: [PATCH] Resolving Jenkins e2e issue Signed-off-by: Tushar Tathgur --- ci/jenkins/test-vmc.sh | 2 +- test/e2e/framework.go | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ci/jenkins/test-vmc.sh b/ci/jenkins/test-vmc.sh index 51871073..07ef7a6a 100644 --- a/ci/jenkins/test-vmc.sh +++ b/ci/jenkins/test-vmc.sh @@ -313,7 +313,7 @@ function deliver_antrea { antrea_yml="antrea.yml" # Enable verbose log for troubleshooting. sed -i "s/--v=0/--v=4/g" $GIT_CHECKOUT_DIR/build/yamls/$antrea_yml - perl -i -p0e 's/ # feature, you need to set "enable" to true, and ensure that the FlowExporter\n # feature gate is also enabled.\n enable: false/ # feature, you need to set "enable" to true, and ensure that the FlowExporter\n # feature gate is also enabled.\n enable: true/' $TMP_DIR/antrea.yml + perl -i -p0e 's/ # feature, you need to set "enable" to true, and ensure that the FlowExporter\n # feature gate is also enabled.\n enable: false/ # feature, you need to set "enable" to true, and ensure that the FlowExporter\n # feature gate is also enabled.\n enable: true/' $GIT_CHECKOUT_DIR/build/yamls/antrea.yml sed -i -e "s/flowPollInterval: \"5s\"/flowPollInterval: \"1s\"/g" $GIT_CHECKOUT_DIR/build/yamls/$antrea_yml sed -i -e "s/activeFlowExportTimeout: \"5s\"/activeFlowExportTimeout: \"2s\"/g" $GIT_CHECKOUT_DIR/build/yamls/$antrea_yml sed -i -e "s/idleFlowExportTimeout: \"15s\"/idleFlowExportTimeout: \"1s\"/g" $GIT_CHECKOUT_DIR/build/yamls/$antrea_yml diff --git a/test/e2e/framework.go b/test/e2e/framework.go index 3a3a3d7d..2b386b1a 100644 --- a/test/e2e/framework.go +++ b/test/e2e/framework.go @@ -736,7 +736,14 @@ func (data *TestData) PodWaitFor(timeout time.Duration, name, namespace string, }) if err != nil { if err == wait.ErrWaitTimeout && pod != nil { - return nil, fmt.Errorf("timed out waiting for the condition, Pod.Status: %s", pod.Status.String()) + _, stdout, _, _ := data.provider.RunCommandOnNode(controlPlaneNodeName(), fmt.Sprintf("kubectl -n %s describe pod %s", flowVisibilityNamespace, name)) + fmt.Printf("Tushar Pod %s description %s\n", name, stdout) + logString, err := data.GetPodLogs(flowVisibilityNamespace, name, nil) + if err !=nil{ + fmt.Printf("TUSHAR ERROR%v", err) + } + fmt.Printf("Tushar Pod %s Logs %s\n", name, logString) + return nil, fmt.Errorf("timed out waiting for the condition, Pod name:%s, Pod.Status: %s", name, pod.Status.String()) } return nil, err }