rancher / wharfie

Pulls and unpacks a container image to the local filesystem. Usable both as a standalone CLI tool, and as a go module.
Apache License 2.0
25 stars 14 forks source link

Increase dial timeout to allow for DNS failover #11

Closed brandond closed 1 year ago

brandond commented 1 year ago

The Transport config cribbed from https://github.com/google/go-containerregistry/blob/v0.12.1/pkg/v1/remote/options.go#L85-L101 sets a 5 second dial timeout. Unfortunately, the spec for DNS clients requires a 5 second delay before trying secondary nameservers. This meant that if the primary nameserver is unavailable, wharfie would timeout the dial before consulting secondary nameservers.

Raising this to 16 seconds will increase delays when failing over from unavailable upstream registries, but should properly handle DNS server failover.

Signed-off-by: Brad Davidson brad.davidson@rancher.com

brandond commented 1 year ago

Ref: SURE-5646 @Martin-Weiss

Martin-Weiss commented 1 year ago

@brandond - thanks so much for your great help in debugging and unblocking us! You are the best!

Do you have a build that includes this potential fix so we can give it a try and validate it?