mirror of https://github.com/status-im/consul.git
agent: Support -advertise cli flag. Fixes #156.
This commit is contained in:
parent
bae3c1606c
commit
246ad6c681
|
@ -57,6 +57,7 @@ func (c *Command) readConfig() *Config {
|
|||
|
||||
cmdFlags.StringVar(&cmdConfig.ClientAddr, "client", "", "address to bind client listeners to (DNS, HTTP, RPC)")
|
||||
cmdFlags.StringVar(&cmdConfig.BindAddr, "bind", "", "address to bind server listeners to")
|
||||
cmdFlags.StringVar(&cmdConfig.AdvertiseAddr, "advertise", "", "address to advertise instead of bind addr")
|
||||
|
||||
cmdFlags.IntVar(&cmdConfig.Protocol, "protocol", -1, "protocol version")
|
||||
|
||||
|
@ -467,6 +468,7 @@ Usage: consul agent [options]
|
|||
|
||||
Options:
|
||||
|
||||
-advertise=addr Sets the advertise address to use
|
||||
-bootstrap Sets server to bootstrap mode
|
||||
-bind=0.0.0.0 Sets the bind address for cluster communication
|
||||
-client=127.0.0.1 Sets the address to bind for client access.
|
||||
|
|
|
@ -26,6 +26,13 @@ are documented below.
|
|||
|
||||
The options below are all specified on the command-line.
|
||||
|
||||
* `-advertise` - The advertise address is used to change the address that we
|
||||
advertise to other nodes in the cluster. By default, the `-bind` address is
|
||||
advertised. However, in some cases, there may be a routable address that cannot
|
||||
be bound to. This flag enables gossiping a different address to support this.
|
||||
If this address is not routable, the node will be in a constant flapping state,
|
||||
as other nodes will treat the non-routability as a failure.
|
||||
|
||||
* `-bootstrap` - This flag is used to control if a server is in "bootstrap" mode. It is important that
|
||||
no more than one server *per* datacenter be running in this mode. The initial server **must** be in bootstrap
|
||||
mode. Technically, a server in bootstrap mode is allowed to self-elect as the Raft leader. It is important
|
||||
|
@ -150,12 +157,7 @@ definitions support being updated during a reload.
|
|||
|
||||
* `ui_dir` - Equivalent to the `-ui-dir` command-line flag.
|
||||
|
||||
* `advertise_addr` - The advertise address is used to change the address that we
|
||||
advertise to other nodes in the cluster. By default, the `-bind` address is
|
||||
advertised. However, in some cases, there may be a routable address that cannot
|
||||
be bound to. This flag enables gossiping a different address to support this.
|
||||
If this address is not routable, the node will be in a constant flapping state,
|
||||
as other nodes will treat the non-routability as a failure.
|
||||
* `advertise_addr` - Equivalent to the `-advertise` command-line flag.
|
||||
|
||||
* `ca_file` - This provides a the file path to a PEM encoded certificate authority.
|
||||
The certificate authority is used to check the authenticity of client and server
|
||||
|
|
Loading…
Reference in New Issue