mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
Using the bind addr as server's IP if advertise addr and addresses.HTTP is not specified
This commit is contained in:
@@ -159,9 +159,13 @@ func (a *Agent) serverConfig() (*nomad.Config, error) {
|
||||
if port := a.config.Ports.Serf; port != 0 {
|
||||
conf.SerfConfig.MemberlistConfig.BindPort = port
|
||||
}
|
||||
a.serverHTTPAddr = fmt.Sprintf("%v:%v", a.config.Addresses.HTTP, a.config.Ports.HTTP)
|
||||
|
||||
if a.config.AdvertiseAddrs.HTTP != "" {
|
||||
a.serverHTTPAddr = a.config.AdvertiseAddrs.HTTP
|
||||
} else if a.config.Addresses.HTTP != "" {
|
||||
a.serverHTTPAddr = fmt.Sprintf("%v:%v", a.config.Addresses.HTTP, a.config.Ports.HTTP)
|
||||
} else if a.config.BindAddr != "" {
|
||||
a.serverHTTPAddr = fmt.Sprintf("%v:%v", a.config.BindAddr, a.config.Ports.HTTP)
|
||||
}
|
||||
|
||||
if gcThreshold := a.config.Server.NodeGCThreshold; gcThreshold != "" {
|
||||
|
||||
Reference in New Issue
Block a user