Load Balancer DNS resolution takes too long #5032
Labels
kind/bug
Categorizes issue or PR as related to a bug.
lifecycle/stale
Denotes an issue or PR has remained open with no activity and has become stale.
needs-priority
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
/kind bug
What steps did you take and what happened:
This issue was discovered by @jianlinliu, @gpei, and @yunjiang29.
As the load balancer reconciliation currently stands, CAPA tries to check for LB DNS name resolution right after the load balancer is created. The DNS name resolution success is necessary for CAPA to deem the LB as ready [1].
DNS name propagation can usually take a few minutes. If we try to resolve the name too soon, we might get:
and the name resolution will keep failing with the cached answer for the next TTL=600s=10min.
We have observed in some systems that the TTL for LB DNS in the
us-gov-west-1
region could be as high as 900s.[1] https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/main/controllers/awscluster_controller.go#L291-L298
What did you expect to happen:
To get around this problem, maybe we can wait after the LB is created until the resolution is most likely to succeed (around
2min
) before attempting the first DNS resolution. This would decrease the chance of waiting too long for the LB name to resolve due to high TTLs.Anything else you would like to add:
PR to follow soon.
Environment:
kubectl version
):/etc/os-release
):The text was updated successfully, but these errors were encountered: