- 
                Notifications
    You must be signed in to change notification settings 
- Fork 9
work around DNS delays in ARM64 CI #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
work around DNS delays in ARM64 CI #44
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! ![]()
| default `gethostbyname()` resolver used by nginx will not use DNS.""" | ||
| script = f""" | ||
| for service in {" ".join(f"'{service}'" for service in services)}; do | ||
| getent hosts "$service" >>/etc/hosts | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First time I encounter getent, interesting. I thought you would use docker inspect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docker inspect might be a better way. I'll have a look.
7745d0a    to
    ef007f3      
    Compare
  
    | Thanks. I'll resolve the conflicts and merge after the ARM64 branch is merged into master. | 
| It has been cherry-picked in #45 . Thanks a lot @dgoffredo. | 
nginx uses
gethostbyname()to look up IP addresses for upstreams (unless you designate a resolver). Both libc flavors (glibc and musl) as configured in our test images, will first check/etc/hostsbefore going to DNS. DNS sometimes takes five seconds (instead of the more typical < 1 ms), which causes a timeout in the tracing library, which causes tests to fail that are checking whether the tracer sent a trace to the Agent.This revision pre-populates the nginx container's
/etc/hostswith the otherdocker composeservices' IP addresses.