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

Throw an error for non-default DNS authority. #2067

Merged
merged 2 commits into from Jun 4, 2018

Conversation

jsha
Copy link
Contributor

@jsha jsha commented May 11, 2018

The gRPC naming document at
https://github.com/grpc/grpc/blob/master/doc/naming.md says:

for DNS, the authority may include the IP[:port] of the DNS server to use

However, grpc-go does not support configuring DNS servers. It will always use
Go's default DNS resolver.

The gRPC naming document at
https://github.com/grpc/grpc/blob/master/doc/naming.md says:

> for DNS, the authority may include the IP[:port] of the DNS server to use

However, grpc-go does not support configuring DNS servers. It will always use
Go's default DNS resolver.
@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

@lyuxuan
Copy link
Contributor

lyuxuan commented May 16, 2018

Hi @jsha, thanks for the pr, could you please sign the CLA?

@jsha
Copy link
Contributor Author

jsha commented May 31, 2018

I've filled out the CLA now.

@@ -67,6 +67,9 @@ type dnsBuilder struct {

// Build creates and starts a DNS resolver that watches the name resolution of the target.
func (b *dnsBuilder) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOption) (resolver.Resolver, error) {
if target.Authority != "" {
return nil, fmt.Errorf("non-default DNS resolver %q not supported", target.Authority)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please change the error message to "Default DNS resolver does not support custom DNS server"? Thanks!

@lyuxuan lyuxuan merged commit 2c5843e into grpc:master Jun 4, 2018
@menghanl menghanl added this to the 1.13 Release milestone Jun 7, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Dec 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants