Skip to content
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

core: Resolve address of GRPC_PROXY_EXP hostname #4027

Merged
merged 1 commit into from
Feb 1, 2018

Conversation

snowp
Copy link
Contributor

@snowp snowp commented Jan 31, 2018

Since this address is never resolved gRPC fails to connect with an
UnresolvedAddressException when the env variable is specified. This
should resolve the address before we attempt to proxy to it.

I know this env variable is scheduled to be removed, so if that's happening in the next version I guess this fix probably isn't necessary.

Also not sure whether there's a good reason why we don't make a DNS lookup here (c.f. comment), but I couldn't find anywhere down the pipeline where this would otherwise get resolved.

Since this address is never resolved gRPC fails to connect with an
UnresolvedAddressException when the env variable is specified. This
should resolve the address before we attempt to proxy to it.
@thelinuxfoundation
Copy link

Thank you for your pull request. Before we can look at your contribution, we need to ensure all contributors are covered by a Contributor License Agreement.

After the following items are addressed, please respond with a new comment here, and the automated system will re-verify.

Regards,
CLA GitHub bot

@snowp
Copy link
Contributor Author

snowp commented Jan 31, 2018

CLA signed

@ejona86
Copy link
Member

ejona86 commented Jan 31, 2018

CC @ericgribkoff

@ejona86
Copy link
Member

ejona86 commented Feb 1, 2018

As discussed elsewhere, we really don't want to do DNS lookups here, but we were before and without it things are broken. The real solution will need to plumb the proxy address through the name resolver. That is being tracked by #4029.

@ejona86
Copy link
Member

ejona86 commented Feb 1, 2018

Oh, and to be clear why we don't want to do DNS lookups here: it is triggered during static initialization. The code before ProxySelector resolved DNS when the builder was built, which was also sub-optimal.

@ejona86 ejona86 added the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Feb 1, 2018
@kokoro-team kokoro-team removed the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Feb 1, 2018
@ejona86 ejona86 merged commit 2c8bc71 into grpc:master Feb 1, 2018
@ejona86 ejona86 added the TODO:backport PR needs to be backported. Removed after backport complete label Feb 1, 2018
@ejona86
Copy link
Member

ejona86 commented Feb 12, 2018

For posterity, this reverts part of #3789.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants