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

Allow manually specifying IP address for service #8140

Closed
Legogris opened this issue Jun 10, 2020 · 3 comments
Closed

Allow manually specifying IP address for service #8140

Legogris opened this issue Jun 10, 2020 · 3 comments

Comments

@Legogris
Copy link

We're provisioning Traefik as a Docker job with host networking, binding the proxy to a public VRRP IP and the management IP to a private VRRP, on separate interfaces.

This works all good, but the services registered in Consul get assigned to the Nomad IP, which makes service checks fail.

I see that this may be covered by the solution to #646 , but I think this is a common use-case that can have a simpler solution not requiring changes to the client config, by simply allowing specification of the IP address to use in the serviceor check stanza with an added address field.

@dradtke
Copy link

dradtke commented Jun 14, 2020

I've run into this issue too, but in a different way. My cluster is configured to bind to and advertise IPv6 addresses for both Nomad and Consul, but Nomad always picks the public IPv4 address when registering a service using the exec driver. The discrepancy can be seen pretty easily in the service details:

"Address": "2600:3c04::f03c:92ff:fecc:a637",           
"TaggedAddresses": {
  "lan": "2600:3c04::f03c:92ff:fecc:a637",
  "lan_ipv6": "2600:3c04::f03c:92ff:fecc:a637",
  "wan": "2600:3c04::f03c:92ff:fecc:a637",
  "wan_ipv6": "2600:3c04::f03c:92ff:fecc:a637"
},
"ServiceAddress": "172.105.110.245",
"ServiceTaggedAddresses": {
  "lan_ipv4": {
    "Address": "172.105.110.245",
    "Port": 23037
  },
  "wan_ipv4": {
    "Address": "172.105.110.245",
    "Port": 23037
  }
}

The address is correctly using the advertised IPv6 address, but the service address is still picking the IPv4 address, which in this case is causing Fabio to route requests to the wrong address.

@shoenig
Copy link
Member

shoenig commented Aug 12, 2022

Implemented in #12720

@shoenig shoenig closed this as completed Aug 12, 2022
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants