mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 09:49:50 +00:00
Merge pull request #100893 from aojea/fix_hostNework
e2e test with hostNetwork pods can't run in parallel
This commit is contained in:
commit
11f95dc047
@ -468,21 +468,6 @@ var _ = common.SIGDescribe("Networking", func() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
ginkgo.It("should function for pod-Service(hostNetwork): udp", func() {
|
|
||||||
config := e2enetwork.NewNetworkingTestConfig(f, e2enetwork.EndpointsUseHostNetwork)
|
|
||||||
ginkgo.By(fmt.Sprintf("dialing(udp) %v --> %v:%v (config.clusterIP)", config.TestContainerPod.Name, config.ClusterIP, e2enetwork.ClusterUDPPort))
|
|
||||||
err := config.DialFromTestContainer("udp", config.ClusterIP, e2enetwork.ClusterUDPPort, config.MaxTries, 0, config.EndpointHostnames())
|
|
||||||
if err != nil {
|
|
||||||
framework.Failf("failed dialing endpoint, %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
ginkgo.By(fmt.Sprintf("dialing(udp) %v --> %v:%v (nodeIP)", config.TestContainerPod.Name, config.NodeIP, config.NodeUDPPort))
|
|
||||||
err = config.DialFromTestContainer("udp", config.NodeIP, config.NodeUDPPort, config.MaxTries, 0, config.EndpointHostnames())
|
|
||||||
if err != nil {
|
|
||||||
framework.Failf("failed dialing endpoint, %v", err)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
// if the endpoints pods use hostNetwork, several tests can't run in parallel
|
// if the endpoints pods use hostNetwork, several tests can't run in parallel
|
||||||
// because the pods will try to acquire the same port in the host.
|
// because the pods will try to acquire the same port in the host.
|
||||||
// We run the test in serial, to avoid port conflicts.
|
// We run the test in serial, to avoid port conflicts.
|
||||||
@ -502,6 +487,20 @@ var _ = common.SIGDescribe("Networking", func() {
|
|||||||
framework.Failf("failed dialing endpoint, %v", err)
|
framework.Failf("failed dialing endpoint, %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ginkgo.By("pod-Service(hostNetwork): udp")
|
||||||
|
|
||||||
|
ginkgo.By(fmt.Sprintf("dialing(udp) %v --> %v:%v (config.clusterIP)", config.TestContainerPod.Name, config.ClusterIP, e2enetwork.ClusterUDPPort))
|
||||||
|
err = config.DialFromTestContainer("udp", config.ClusterIP, e2enetwork.ClusterUDPPort, config.MaxTries, 0, config.EndpointHostnames())
|
||||||
|
if err != nil {
|
||||||
|
framework.Failf("failed dialing endpoint, %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
ginkgo.By(fmt.Sprintf("dialing(udp) %v --> %v:%v (nodeIP)", config.TestContainerPod.Name, config.NodeIP, config.NodeUDPPort))
|
||||||
|
err = config.DialFromTestContainer("udp", config.NodeIP, config.NodeUDPPort, config.MaxTries, 0, config.EndpointHostnames())
|
||||||
|
if err != nil {
|
||||||
|
framework.Failf("failed dialing endpoint, %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
ginkgo.By("node-Service(hostNetwork): http")
|
ginkgo.By("node-Service(hostNetwork): http")
|
||||||
|
|
||||||
ginkgo.By(fmt.Sprintf("dialing(http) %v (node) --> %v:%v (config.clusterIP)", config.NodeIP, config.ClusterIP, e2enetwork.ClusterHTTPPort))
|
ginkgo.By(fmt.Sprintf("dialing(http) %v (node) --> %v:%v (config.clusterIP)", config.NodeIP, config.ClusterIP, e2enetwork.ClusterHTTPPort))
|
||||||
|
Loading…
Reference in New Issue
Block a user