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

Unable to use dns search #10

Closed
JeanMertz opened this issue Jul 18, 2015 · 2 comments
Closed

Unable to use dns search #10

JeanMertz opened this issue Jul 18, 2015 · 2 comments

Comments

@JeanMertz
Copy link

I seem to be unable to use the DNS_RESOLVES variable to use the "dns search" functionality of resolvable.

After starting resolvable, this is the output I get:

resolvable_1 | 2015/07/18 20:35:11 systemd: disabled, cannot read /tmp/systemd: stat /tmp/systemd: no such file or directory
resolvable_1 | 2015/07/18 20:35:11 Starting resolvable 0.2 ...
resolvable_1 | 2015/07/18 20:35:11 got local address: 172.17.42.207
resolvable_1 | 2015/07/18 20:35:11 updating resolv.conf: /tmp/resolv.conf

Resolvable starts after the Consul container, which has -e DNS_RESOLVES=consul set. If I start a third container, and enter it, I can see the following:

% cat /etc/hosts
172.17.42.217   f0ca83d2d315
127.0.0.1   localhost
172.17.42.208   consul 9c4e27c17d50 dev_consul_1
172.17.42.208   consul_1 9c4e27c17d50 dev_consul_1
172.17.42.208   dev_consul_1 9c4e27c17d50
172.17.42.212   dev_registrator_1
172.17.42.212   dev_registrator_1.bridge
172.17.42.217   dev_r_run_1.bridge
172.17.42.207   dev_resolvable_1
172.17.42.217   dev_r_run_1
172.17.42.207   dev_resolvable_1.bridge
172.17.42.208   dev_consul_1
172.17.42.208   dev_consul_1.bridge
% cat /etc/resolv.conf 
nameserver 172.17.42.207 # added by resolvable
% ping consul.service.consul
PING consul.service.consul (172.17.42.208): 56 data bytes
% ping consul.service
ping: bad address 'consul.service'

Note: I was redirected to this tool from gliderlabs/docker-alpine#8. I already had DNS querying solved using the FQDN, but I was hoping the use of resolvable would help me use dns search to simplify the domains.

@JeanMertz
Copy link
Author

After thinking about this some more, I might have misinterpreted the use of DNS_RESOLVES. I believe this is only used to let resolvable know which DNS service to use for which domains, which has little to do with the dns search capabilities.

Having said that, is there anything resolvable can do to make the dns searching work, when using an OS based on musl, which does not support the search directive in resolv.conf?

@mgood
Copy link
Contributor

mgood commented Jul 19, 2015

Yeah, that's right. The DNS_RESOLVES just registers that container to send queries for the given domains, but it's not using it as a DNS "search" domain.

We've talked about search support like you mention, so you could open a ticket for that feature. It should be possible for resolvable to parse "search" statements from resolv.conf at startup and then use that for queries.

@mgood mgood closed this as completed Jul 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants