-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Add -bind-iface to bind consul to a specific interface #1110
Comments
In general the concept makes sense to me, but I wonder what we do in cases where we have multiple IP aliases on a single interface. I'll mark this as a thought ticket for now. |
Ryan, good point. I was thinking about a use case specifically where this is not the case. I think it would be safe to assume if you're using this feature and there is more than one IP on a NIC, consul could issue a warning that it cannot bind reliably to the NIC and fall back on binding as it does to 0.0.0.0 |
This would be a great addition, and would help greatly during our packer base box provisions. |
May I suggest an alternative configuration to the same end? Instead of specifying an interface name using a distinct option, I'd prefer specifying a network with the existing options, e.g. 10.1.2.0/24 - with the implementation then picking the local address found being inside that network. For the deployment I'm planning, I have three types of boxes that all share the same network, but each type has a different interface naming convention. |
@cruatta / @jness / @bof : Please give the latest code in
There is now a configurable template language for examples and docs) behind this that you can use to create a customizable heuristic that should allow you to get whatever it is that you need from your environment when using an immutable image (see hashicorp/go-sockaddr/template and cmd/sockaddr. |
💭 Add an option to bind consul to a specific interface and whatever the ip address of that interface is. For example, if I'm provisioning 100 servers, I might know I'll have a bond1 on my servers that I know I want consul to bind to. If it's not the first private interface, I won't be able to rely on 0.0.0.0 and I don't want to have to specify the IP addresses for 100 servers in my configs. Just a thought since a lot of people seem to be having issues with consul binding to interfaces it should not be binding to. Does that make sense?
The text was updated successfully, but these errors were encountered: