{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/consul/issues/1386","labels_url":"https://api.github.com/repos/hashicorp/consul/issues/1386/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/consul/issues/1386/comments","events_url":"https://api.github.com/repos/hashicorp/consul/issues/1386/events","html_url":"https://github.com/hashicorp/consul/issues/1386","id":115417661,"number":1386,"title":"Consul Service Address Resolution with `advertise_addr_wan`","user":{"login":"evan2645","id":1944142,"avatar_url":"https://avatars.githubusercontent.com/u/1944142?v=3","gravatar_id":"","url":"https://api.github.com/users/evan2645","html_url":"https://github.com/evan2645","followers_url":"https://api.github.com/users/evan2645/followers","following_url":"https://api.github.com/users/evan2645/following{/other_user}","gists_url":"https://api.github.com/users/evan2645/gists{/gist_id}","starred_url":"https://api.github.com/users/evan2645/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evan2645/subscriptions","organizations_url":"https://api.github.com/users/evan2645/orgs","repos_url":"https://api.github.com/users/evan2645/repos","events_url":"https://api.github.com/users/evan2645/events{/privacy}","received_events_url":"https://api.github.com/users/evan2645/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-06T01:52:20Z","updated_at":"2015-11-06T05:03:00Z","closed_at":null,"body":"I am using consul between three datacenters. All hosts have 1:1 NAT to the internet. It is desirable to use private addresses when hosts are in the same datacenter, and WAN addresses when the host is in a remote datacenter. Consul provides a knob `advertise_addr_wan`, and the documentation suggests that it serves this purpose:\r\n```\r\nHowever, in some cases all members of all datacenters cannot be on the same\r\nphysical or virtual network, especially on hybrid setups mixing cloud and private\r\ndatacenters. This flag enables server nodes gossiping through the public network\r\nfor the WAN while using private VLANs for gossiping to each other and their client\r\nagents.\r\n```\r\nWe have correctly set the `advertise_addr_wan` on all hosts, yet the service resolution stuff doesn't seem to pay attention to it... i.e. querying for ZK hosts in a different datacenter returns private addresses instead of the WAN address we've configured. Am I missing something here? Is this only applicable to server nodes which are gossiping with the other DC's? We set this value on all clients... not having this automatic translation in Consul is causing us a good deal of pain at the moment"},"comment":{"url":"https://api.github.com/repos/hashicorp/consul/issues/comments/154286393","html_url":"https://github.com/hashicorp/consul/issues/1386#issuecomment-154286393","issue_url":"https://api.github.com/repos/hashicorp/consul/issues/1386","id":154286393,"user":{"login":"evan2645","id":1944142,"avatar_url":"https://avatars.githubusercontent.com/u/1944142?v=3","gravatar_id":"","url":"https://api.github.com/users/evan2645","html_url":"https://github.com/evan2645","followers_url":"https://api.github.com/users/evan2645/followers","following_url":"https://api.github.com/users/evan2645/following{/other_user}","gists_url":"https://api.github.com/users/evan2645/gists{/gist_id}","starred_url":"https://api.github.com/users/evan2645/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evan2645/subscriptions","organizations_url":"https://api.github.com/users/evan2645/orgs","repos_url":"https://api.github.com/users/evan2645/repos","events_url":"https://api.github.com/users/evan2645/events{/privacy}","received_events_url":"https://api.github.com/users/evan2645/received_events","type":"User","site_admin":false},"created_at":"2015-11-06T05:03:00Z","updated_at":"2015-11-06T05:03:00Z","body":"Hmm that's unfortunate. How does everyone here feel about this? Would it be\ndisruptive to prefer `advertise_addr_wan` as a service address when queried\nfrom an external DC? What if it was configurable? This is a big need for\nme... Willing to make some contribution\nOn Nov 5, 2015 20:31, \"highlyunavailable\" <notifications@github.com> wrote:\n\n> Is this only applicable to server nodes which are gossiping with the other\n> DC's?\n>\n> Yep, that's it. That setting only controls the WAN pool advertise address\n> which only servers participate in.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/hashicorp/consul/issues/1386#issuecomment-154282759>.\n>\n"}}