Skip to content

Commit 79394a1

Browse files
committed
Don't require ICMP reject on UDP LB with no endpoints
Allow either drop or reject; we previously made the same change for TCP load balancers.
1 parent 925cb2b commit 79394a1

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

test/e2e/network/loadbalancer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,8 @@ var _ = common.SIGDescribe("LoadBalancers", feature.LoadBalancer, func() {
387387
err = udpJig.Scale(ctx, 0)
388388
framework.ExpectNoError(err)
389389

390-
ginkgo.By("looking for ICMP REJECT on the UDP service's LoadBalancer")
391-
testRejectedUDP(ctx, udpIngressIP, svcPort, loadBalancerCreateTimeout)
390+
ginkgo.By("checking that the UDP service's LoadBalancer is not reachable")
391+
testNotReachableUDP(ctx, udpIngressIP, svcPort, loadBalancerCreateTimeout)
392392

393393
ginkgo.By("Scaling the pods to 1")
394394
err = udpJig.Scale(ctx, 1)

test/e2e/network/service.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -606,20 +606,6 @@ func testNotReachableUDP(ctx context.Context, host string, port int, timeout tim
606606
}
607607
}
608608

609-
// testRejectedUDP tests that the given host rejects a UDP request on the given port.
610-
func testRejectedUDP(ctx context.Context, host string, port int, timeout time.Duration) {
611-
pollfn := func(ctx context.Context) (bool, error) {
612-
result := pokeUDP(host, port, "echo hello", &UDPPokeParams{Timeout: 3 * time.Second})
613-
if result.Status == UDPRefused {
614-
return true, nil
615-
}
616-
return false, nil // caller can retry
617-
}
618-
if err := wait.PollUntilContextTimeout(ctx, framework.Poll, timeout, true, pollfn); err != nil {
619-
framework.Failf("UDP service %v:%v not rejected: %v", host, port, err)
620-
}
621-
}
622-
623609
// TestHTTPHealthCheckNodePort tests a HTTP connection by the given request to the given host and port.
624610
func TestHTTPHealthCheckNodePort(ctx context.Context, host string, port int, request string, timeout time.Duration, expectSucceed bool, threshold int) error {
625611
count := 0

0 commit comments

Comments
 (0)