{"action":"created","issue":{"url":"https://api.github.com/repos/weaveworks/weave/issues/2161","repository_url":"https://api.github.com/repos/weaveworks/weave","labels_url":"https://api.github.com/repos/weaveworks/weave/issues/2161/labels{/name}","comments_url":"https://api.github.com/repos/weaveworks/weave/issues/2161/comments","events_url":"https://api.github.com/repos/weaveworks/weave/issues/2161/events","html_url":"https://github.com/weaveworks/weave/issues/2161","id":148097888,"number":2161,"title":"Add option to specify weave DNS upstream servers","user":{"login":"timcharper","id":183,"avatar_url":"https://avatars.githubusercontent.com/u/183?v=3","gravatar_id":"","url":"https://api.github.com/users/timcharper","html_url":"https://github.com/timcharper","followers_url":"https://api.github.com/users/timcharper/followers","following_url":"https://api.github.com/users/timcharper/following{/other_user}","gists_url":"https://api.github.com/users/timcharper/gists{/gist_id}","starred_url":"https://api.github.com/users/timcharper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timcharper/subscriptions","organizations_url":"https://api.github.com/users/timcharper/orgs","repos_url":"https://api.github.com/users/timcharper/repos","events_url":"https://api.github.com/users/timcharper/events{/privacy}","received_events_url":"https://api.github.com/users/timcharper/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/weaveworks/weave/labels/feature","name":"feature","color":"009800"},{"url":"https://api.github.com/repos/weaveworks/weave/labels/[component/dns]","name":"[component/dns]","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-04-13T15:27:40Z","updated_at":"2016-04-13T17:55:44Z","closed_at":null,"body":"Presently, weave upstream DNS is configurable only via the hosts `/etc/resolv.conf`. I'd like to configure weave to be the host's DNS server. Doing so now results in an infinite loop.\r\n\r\nAs a workaround for not having this option, I've created a `systemd` script which moves the system `/etc/resolv.conf` out of the way, and puts in the desired weave configuration, while weave is starting. Then, once started, it puts the files back to its original form.\r\n\r\nI found the code which is reading the configuration here:\r\n\r\nhttps://github.com/weaveworks/weave/blob/v1.4.6/nameserver/dns.go#L62\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/weaveworks/weave/issues/comments/209566897","html_url":"https://github.com/weaveworks/weave/issues/2161#issuecomment-209566897","issue_url":"https://api.github.com/repos/weaveworks/weave/issues/2161","id":209566897,"user":{"login":"timcharper","id":183,"avatar_url":"https://avatars.githubusercontent.com/u/183?v=3","gravatar_id":"","url":"https://api.github.com/users/timcharper","html_url":"https://github.com/timcharper","followers_url":"https://api.github.com/users/timcharper/followers","following_url":"https://api.github.com/users/timcharper/following{/other_user}","gists_url":"https://api.github.com/users/timcharper/gists{/gist_id}","starred_url":"https://api.github.com/users/timcharper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timcharper/subscriptions","organizations_url":"https://api.github.com/users/timcharper/orgs","repos_url":"https://api.github.com/users/timcharper/repos","events_url":"https://api.github.com/users/timcharper/events{/privacy}","received_events_url":"https://api.github.com/users/timcharper/received_events","type":"User","site_admin":false},"created_at":"2016-04-13T17:55:44Z","updated_at":"2016-04-13T17:55:44Z","body":"I'd thought of that; since `weave-dns` gets it's upstream DNS servers from `/etc/resolv.conf`, I would need an `/etc/resolv.conf` that looks like this:\r\n\r\n```\r\nsearch mesos\r\nnameserver 172.17.0.1\r\nnameserver 10.141.141.11\r\n```\r\n\r\n... and then I would have heterogeneously responding DNS servers in `/etc/resolv.conf`. `musl-libc` would sometimes use `mesos-dns`, and sometimes use `weave-dns`, meaning queries intended for `weave-dns` would only work about half the time.\r\n\r\n"}}