-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Use an interface name to find the bind addr for rpc, http and serf components #941
Conversation
switch v := (addr).(type) { | ||
case *net.IPNet: | ||
ip = v.IP | ||
if ip.To4() != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think there is any merit in ignoring the loopback IP here? Binding to a loopback IP does not make sense since no one else can access it. This might help if the user mistakenly puts something like lo0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@achanda This is an operator(sysadmin) setting. We trust the operator to do the right thing.
@@ -255,6 +259,12 @@ type Addresses struct { | |||
Serf string `mapstructure:"serf"` | |||
} | |||
|
|||
type Interfaces struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Throw some comments on these
LGTM |
Also documentation for the website |
f43bd67
to
c25be74
Compare
a79aa7a
to
78de2fc
Compare
Use an interface name to find the bind addr for rpc, http and serf components
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
This PR allows the operators to specify an interface name which Nomad will use to find an IP address and use it for the http service, serf and rpc.
For example, with the following configuration -
Nomad will find the IPs configured for each of the network interfaces and use one of the IPs for binding the network services. IPv4 addresses are given preference over IPv6