From 12ca2dd8a2be7f15b713eac70658922fe20d68b3 Mon Sep 17 00:00:00 2001 From: Antonio Ojea Date: Sun, 10 Mar 2019 21:26:29 +0100 Subject: [PATCH] Add IPv6 support to the nettest image The test [sig-node] PreStop should call prestop when killing a pod [Conformance] use the nettest image for testing, but it turns out that this image is configured to listen in the address 0.0.0.0. Removing the address from the function http.ListenAndServe makes it start listening on both IPv4 and IPv6 addresses. Reference: https://github.com/kubernetes/kubernetes/issues/70248 Signed-off-by: Antonio Ojea --- test/images/nettest/nettest.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/images/nettest/nettest.go b/test/images/nettest/nettest.go index 8336d7cfeb..50b0a9df4a 100644 --- a/test/images/nettest/nettest.go +++ b/test/images/nettest/nettest.go @@ -210,7 +210,7 @@ func main() { http.HandleFunc("/write", state.serveWrite) http.HandleFunc("/status", state.serveStatus) - go log.Fatal(http.ListenAndServe(fmt.Sprintf("0.0.0.0:%d", *port), nil)) + go log.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", *port), nil)) select {} }