Skip to content

Commit fdbe691

Browse files
committed
e2e: fix flake on loadbalancer tests
validating that one endpoint is reachable from one part of the cluster is not enough condition to consider it will be reachable from any node, as different Services proxies on different nodes will have different propagation delays for the EndpointSlices and Services information.
1 parent 7693a7e commit fdbe691

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/e2e/network/loadbalancer.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -480,10 +480,10 @@ var _ = common.SIGDescribe("LoadBalancers", feature.LoadBalancer, func() {
480480
e2eservice.TestReachableHTTP(ctx, ingress, svcPort, loadBalancerLagTimeout)
481481

482482
ginkgo.By("checking reachability from pods when LoadBalancerSourceRanges is unset")
483-
// We can use timeout 0 here since we know from above that the service is
484-
// already running (and we aren't waiting for changes to it to propagate).
485-
checkReachabilityFromPod(ctx, true, 0, namespace, acceptPod.Name, ingress)
486-
checkReachabilityFromPod(ctx, true, 0, namespace, dropPod.Name, ingress)
483+
// There are different propagation delay for the APIs for different nodes, so it tries
484+
// a few times, despite previously it was confirmed that the Service was reachable.
485+
checkReachabilityFromPod(ctx, true, e2eservice.KubeProxyEndpointLagTimeout, namespace, acceptPod.Name, ingress)
486+
checkReachabilityFromPod(ctx, true, e2eservice.KubeProxyEndpointLagTimeout, namespace, dropPod.Name, ingress)
487487

488488
// Create source ranges that allow acceptPod but not dropPod or
489489
// cluster-external sources. We assume that the LBSR rules will either see

0 commit comments

Comments
 (0)