Commit 019a15c3 authored by Dane LeBlanc's avatar Dane LeBlanc

Add IPv6 option for e2e iPerf test

The e2e iPerf test case currently only runs in IPv4 mode. This change add an option to run an iPerf test in IPv6 mode (i.e. by running iPerf with a "-V" command line flag), so that the test can be run on IPv6-only clusters.
parent 4c115a86
...@@ -36,9 +36,8 @@ const ( ...@@ -36,9 +36,8 @@ const (
smallClusterTimeout = 200 * time.Second smallClusterTimeout = 200 * time.Second
) )
// Declared as Flakey since it has not been proven to run in parallel on small nodes or slow networks in CI // networkingIPerf test runs iperf on a container in either IPv4 or IPv6 mode.
// TODO jayunit100 : Retag this test according to semantics from #22401 func networkingIPerfTest(isIPv6 bool) {
var _ = SIGDescribe("Networking IPerf [Experimental] [Slow] [Feature:Networking-Performance]", func() {
f := framework.NewDefaultFramework("network-perf") f := framework.NewDefaultFramework("network-perf")
...@@ -49,6 +48,11 @@ var _ = SIGDescribe("Networking IPerf [Experimental] [Slow] [Feature:Networking- ...@@ -49,6 +48,11 @@ var _ = SIGDescribe("Networking IPerf [Experimental] [Slow] [Feature:Networking-
numServer := 1 numServer := 1
maxBandwidthBits := gceBandwidthBitsEstimate maxBandwidthBits := gceBandwidthBitsEstimate
familyStr := ""
if isIPv6 {
familyStr = "-V "
}
It(fmt.Sprintf("should transfer ~ 1GB onto the service endpoint %v servers (maximum of %v clients)", numServer, numClient), func() { It(fmt.Sprintf("should transfer ~ 1GB onto the service endpoint %v servers (maximum of %v clients)", numServer, numClient), func() {
nodes := framework.GetReadySchedulableNodesOrDie(f.ClientSet) nodes := framework.GetReadySchedulableNodesOrDie(f.ClientSet)
totalPods := len(nodes.Items) totalPods := len(nodes.Items)
...@@ -68,7 +72,7 @@ var _ = SIGDescribe("Networking IPerf [Experimental] [Slow] [Feature:Networking- ...@@ -68,7 +72,7 @@ var _ = SIGDescribe("Networking IPerf [Experimental] [Slow] [Feature:Networking-
Args: []string{ Args: []string{
"/bin/sh", "/bin/sh",
"-c", "-c",
"/usr/local/bin/iperf -s -p 8001 ", "/usr/local/bin/iperf " + familyStr + "-s -p 8001 ",
}, },
Ports: []v1.ContainerPort{{ContainerPort: 8001}}, Ports: []v1.ContainerPort{{ContainerPort: 8001}},
}}, }},
...@@ -96,7 +100,7 @@ var _ = SIGDescribe("Networking IPerf [Experimental] [Slow] [Feature:Networking- ...@@ -96,7 +100,7 @@ var _ = SIGDescribe("Networking IPerf [Experimental] [Slow] [Feature:Networking-
Args: []string{ Args: []string{
"/bin/sh", "/bin/sh",
"-c", "-c",
"/usr/local/bin/iperf -c service-for-" + appName + " -p 8002 --reportstyle C && sleep 5", "/usr/local/bin/iperf " + familyStr + "-c service-for-" + appName + " -p 8002 --reportstyle C && sleep 5",
}, },
}, },
}, },
...@@ -153,4 +157,16 @@ var _ = SIGDescribe("Networking IPerf [Experimental] [Slow] [Feature:Networking- ...@@ -153,4 +157,16 @@ var _ = SIGDescribe("Networking IPerf [Experimental] [Slow] [Feature:Networking-
framework.Logf("%v had bandwidth %v. Ratio to expected (%v) was %f", ipClient, bandwidth, expectedBandwidth, float64(bandwidth)/float64(expectedBandwidth)) framework.Logf("%v had bandwidth %v. Ratio to expected (%v) was %f", ipClient, bandwidth, expectedBandwidth, float64(bandwidth)/float64(expectedBandwidth))
} }
}) })
}
// Declared as Flakey since it has not been proven to run in parallel on small nodes or slow networks in CI
// TODO jayunit100 : Retag this test according to semantics from #22401
var _ = SIGDescribe("Networking IPerf IPv4 [Experimental] [Feature:Networking-IPv4] [Slow] [Feature:Networking-Performance]", func() {
networkingIPerfTest(false)
})
// Declared as Flakey since it has not been proven to run in parallel on small nodes or slow networks in CI
// TODO jayunit100 : Retag this test according to semantics from #22401
var _ = SIGDescribe("Networking IPerf IPv6 [Experimental] [Feature:Networking-IPv6] [Slow] [Feature:Networking-Performance]", func() {
networkingIPerfTest(true)
}) })
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment