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

Implements WAN address translation. #1698

Merged
merged 19 commits into from
Feb 7, 2016
Merged

Implements WAN address translation. #1698

merged 19 commits into from
Feb 7, 2016

Conversation

slackpad
Copy link
Contributor

@slackpad slackpad commented Feb 7, 2016

All of the real work here was done by @evan2645 under #1547. This takes that PR and does the following:

  • Rebased to latest master.
  • Added some documentation and extra tests.
  • Generalized the WAN address configuration into a first-class TaggedAddresses config item. This is populated only with the WAN address for now, but it gives us a good base to expose this as a configurable thing later for additional address tags.
  • Changed the name of the Node structure member from Addresses to TaggedAddresses. Having Addresses next to Address was too subtle (even though it was my original suggestion to name it that, sorry to change it again).
  • Made anti-entropy sync take care of setting this in the catalog instead of the Serf layer. This will be better if we add more later, and it keeps the logic out of some places like leader.go, and it doesn't add any new Serf tags where space is limited.

evan2645 and others added 17 commits February 6, 2016 23:01
`AdvertiseAddrs` has been introduced as a configuration option, which
duplicates a few other options, namely `AdvertiseAddrWan`. We need to
use this value elsewhere, so rather than doing a precedence check every
time we need to access it, rectify the value of `AdvertiseAddrWan` to
match
This knob tells consul whether it should prefer the WAN address (if set)
when making service lookups in remote datacenters. This enables
reachability for remote services which are behind a NAT.
Otherwise, the tests will fail when run on a machine with multiple
private addresses
@slackpad
Copy link
Contributor Author

slackpad commented Feb 7, 2016

This fixes #1386.

slackpad added a commit that referenced this pull request Feb 7, 2016
Implements WAN address translation.
@slackpad slackpad merged commit d2cc280 into master Feb 7, 2016
@slackpad slackpad deleted the pr-1547-slackpad branch February 7, 2016 22:26
@dvgica
Copy link

dvgica commented Jun 9, 2016

@slackpad thanks for your awesome work on this! We've been trying to use this feature but unfortunately it seems that it's only available through the DNS interface. What I would really like to see is the appropriately translated address available in the "Address" field of the node object when querying through the HTTP API.

I've been chatting with @evan2645 about this, and he thinks that the above should be do-able. I'm ready to start on a patch but wanted to check with you to see if there was any reason this isn't feasible, or if there was any reason it's a Bad Idea. Thanks!

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

Successfully merging this pull request may close these issues.

4 participants