From ff8573343c16f1e97e92ad8555218aa57ebd271e Mon Sep 17 00:00:00 2001 From: Antonio Ojea Date: Tue, 7 May 2024 08:53:27 +0000 Subject: [PATCH] Revert "e2e/network: stream pod logs for debugging" This reverts commit d70f96fe220007cd2b87497f74afc6ac24f9be00. --- test/e2e/network/networking.go | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/test/e2e/network/networking.go b/test/e2e/network/networking.go index 98bd29c32fc..be7f99b077f 100644 --- a/test/e2e/network/networking.go +++ b/test/e2e/network/networking.go @@ -17,7 +17,6 @@ limitations under the License. package network import ( - "bufio" "context" "fmt" "strconv" @@ -328,37 +327,6 @@ var _ = common.SIGDescribe("Networking", func() { ginkgo.It("should update endpoints: http", func(ctx context.Context) { config := e2enetwork.NewNetworkingTestConfig(ctx, f) - - // start of intermittent code snippet to understand the reason for flaky behaviour - // TODO @aroradaman @aojea remove this once issue #123760 is resolved - // streaming logs for netserver-0 which will be deleted during the test - // (ref: https://github.com/kubernetes/kubernetes/issues/123760) - pod0name := config.EndpointPods[0].Name - go func() { - defer ginkgo.GinkgoRecover() - readCloser, err := f.ClientSet.CoreV1().Pods(f.Namespace.Name).GetLogs(pod0name, &v1.PodLogOptions{ - Follow: true, - }).Stream(ctx) - - // silently ignoring error, we don't want to disturb the original test - if err != nil { - return - } - defer func() { - _ = readCloser.Close() - }() - - scanner := bufio.NewScanner(readCloser) - var lines []string - for scanner.Scan() { - lines = append(lines, "\t\t"+scanner.Text()) - } - framework.Logf("================ start of pod log for %s ================", pod0name) - framework.Logf("\n%s", strings.Join(lines, "\n")) - framework.Logf("================ end of pod log for %s ================", pod0name) - }() - // end of intermittent code snippet - ginkgo.By(fmt.Sprintf("dialing(http) %v --> %v:%v (config.clusterIP)", config.TestContainerPod.Name, config.ClusterIP, e2enetwork.ClusterHTTPPort)) err := config.DialFromTestContainer(ctx, "http", config.ClusterIP, e2enetwork.ClusterHTTPPort, config.MaxTries, 0, config.EndpointHostnames()) if err != nil {