Increase dial timeout to allow for DNS failover#11
Merged
brandond merged 1 commit intorancher:mainfrom Dec 23, 2022
Merged
Conversation
The Transport config cribbed from https://github.com/google/go-containerregistry/blob/47f093330862ba6982f644003621eddc9e7dc36e/pkg/v1/remote/options.go#L101-L117 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 <[email protected]>
Member
Author
|
Ref: SURE-5646 @Martin-Weiss |
briandowns
approved these changes
Dec 23, 2022
|
@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? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 [email protected]