Update config docs with places sockaddr is supported

This commit is contained in:
Paul Banks 2018-05-10 14:56:48 +01:00
parent 92c6fe0b1e
commit e6771260a0
No known key found for this signature in database
GPG Key ID: C25A851A849B8221
1 changed files with 67 additions and 32 deletions

View File

@ -43,13 +43,16 @@ configuration reload.
The options below are all specified on the command-line. The options below are all specified on the command-line.
* <a name="_advertise"></a><a href="#_advertise">`-advertise`</a> - The advertise * <a name="_advertise"></a><a href="#_advertise">`-advertise`</a> - The
address is used to change the address that we advertise address is used to change the address that we advertise to other
advertise to other nodes in the cluster. By default, the [`-bind`](#_bind) address is nodes in the cluster. By default, the [`-bind`](#_bind) address is advertised.
advertised. However, in some cases, there may be a routable address that cannot However, in some cases, there may be a routable address that cannot be bound.
be bound. This flag enables gossiping a different address to support this. This flag enables gossiping a different address to support this. If this
If this address is not routable, the node will be in a constant flapping state address is not routable, the node will be in a constant flapping state as
as other nodes will treat the non-routability as a failure. other nodes will treat the non-routability as a failure. In Consul 1.0 and
later this can be set to a
[go-sockaddr](https://godoc.org/github.com/hashicorp/go-sockaddr/template)
template.
* <a name="_advertise-wan"></a><a href="#_advertise-wan">`-advertise-wan`</a> - The * <a name="_advertise-wan"></a><a href="#_advertise-wan">`-advertise-wan`</a> - The
advertise WAN address is used to change the address that we advertise to server nodes advertise WAN address is used to change the address that we advertise to server nodes
@ -61,7 +64,10 @@ The options below are all specified on the command-line.
nodes gossiping through the public network for the WAN while using private VLANs for gossiping nodes gossiping through the public network for the WAN while using private VLANs for gossiping
to each other and their client agents, and it allows client agents to be reached at this to each other and their client agents, and it allows client agents to be reached at this
address when being accessed from a remote datacenter if the remote datacenter is configured address when being accessed from a remote datacenter if the remote datacenter is configured
with <a href="#translate_wan_addrs">`translate_wan_addrs`</a>. with <a href="#translate_wan_addrs">`translate_wan_addrs`</a>. In Consul 1.0 and
later this can be set to a
[go-sockaddr](https://godoc.org/github.com/hashicorp/go-sockaddr/template)
template
* <a name="_bootstrap"></a><a href="#_bootstrap">`-bootstrap`</a> - This flag is used to control if a * <a name="_bootstrap"></a><a href="#_bootstrap">`-bootstrap`</a> - This flag is used to control if a
server is in "bootstrap" mode. It is important that server is in "bootstrap" mode. It is important that
@ -90,23 +96,38 @@ at startup. If you specify "[::]", Consul will
IPv6 address. If there are multiple public IPv6 addresses available, Consul IPv6 address. If there are multiple public IPv6 addresses available, Consul
will exit with an error at startup. will exit with an error at startup.
Consul uses both TCP and UDP and the same port for both. If you Consul uses both TCP and UDP and the same port for both. If you
have any firewalls, be sure to allow both protocols. have any firewalls, be sure to allow both protocols. In Consul 1.0 and later
* <a name="_serf_wan_bind"></a><a href="#_serf_wan_bind">`-serf-wan-bind`</a> - The address that should be bound to for Serf WAN gossip communications.
By default, the value follows the same rules as [`-bind` command-line flag](#_bind), and if this is not specified, the `-bind` option is used. This
is available in Consul 0.7.1 and later.
* <a name="_serf_lan_bind"></a><a href="#_serf_lan_bind">`-serf-lan-bind`</a> - The address that should be bound to for Serf LAN gossip communications.
This is an IP address that should be reachable by all other LAN nodes in the cluster. By default, the value follows the same rules as
[`-bind` command-line flag](#_bind), and if this is not specified, the `-bind` option is used. This is available in Consul 0.7.1 and later.
* <a name="_client"></a><a href="#_client">`-client`</a> - The address to which
Consul will bind client interfaces, including the HTTP and DNS servers. By default,
this is "127.0.0.1", allowing only loopback connections. In Consul 1.0 and later
this can be set to a space-separated list of addresses to bind to, or a this can be set to a space-separated list of addresses to bind to, or a
[go-sockaddr](https://godoc.org/github.com/hashicorp/go-sockaddr/template) template [go-sockaddr](https://godoc.org/github.com/hashicorp/go-sockaddr/template) template
that can potentially resolve to multiple addresses. that can potentially resolve to multiple addresses.
* <a name="_serf_wan_bind"></a><a href="#_serf_wan_bind">`-serf-wan-bind`</a> -
The address that should be bound to for Serf WAN gossip communications. By
default, the value follows the same rules as [`-bind` command-line
flag](#_bind), and if this is not specified, the `-bind` option is used. This
is available in Consul 0.7.1 and later. In Consul 1.0 and later this can be
set to a
[go-sockaddr](https://godoc.org/github.com/hashicorp/go-sockaddr/template)
template
* <a name="_serf_lan_bind"></a><a href="#_serf_lan_bind">`-serf-lan-bind`</a> -
The address that should be bound to for Serf LAN gossip communications. This
is an IP address that should be reachable by all other LAN nodes in the
cluster. By default, the value follows the same rules as [`-bind` command-line
flag](#_bind), and if this is not specified, the `-bind` option is used. This
is available in Consul 0.7.1 and later. In Consul 1.0 and later this can be
set to a
[go-sockaddr](https://godoc.org/github.com/hashicorp/go-sockaddr/template)
template
* <a name="_client"></a><a href="#_client">`-client`</a> - The address to which
Consul will bind client interfaces, including the HTTP and DNS servers. By
default, this is "127.0.0.1", allowing only loopback connections. In Consul
1.0 and later this can be set to a space-separated list of addresses to bind
to, or a
[go-sockaddr](https://godoc.org/github.com/hashicorp/go-sockaddr/template)
template that can potentially resolve to multiple addresses.
* <a name="_config_file"></a><a href="#_config_file">`-config-file`</a> - A configuration file * <a name="_config_file"></a><a href="#_config_file">`-config-file`</a> - A configuration file
to load. For more information on to load. For more information on
the format of this file, read the [Configuration Files](#configuration_files) section. the format of this file, read the [Configuration Files](#configuration_files) section.
@ -214,17 +235,23 @@ will exit with an error at startup.
Note that using Note that using
<a href="#retry_join">`retry_join`</a> could be more appropriate to help <a href="#retry_join">`retry_join`</a> could be more appropriate to help
mitigate node startup race conditions when automating a Consul cluster mitigate node startup race conditions when automating a Consul cluster
deployment.\ deployment.
In Consul 1.1.0 and later this can be set to a
[go-sockaddr](https://godoc.org/github.com/hashicorp/go-sockaddr/template)
template
<a name="_retry_join"></a> <a name="_retry_join"></a>
* `-retry-join` - Similar to [`-join`](#_join) but allows retrying a join if the * `-retry-join` - Similar to [`-join`](#_join) but allows retrying a join if the
first attempt fails. This is useful for cases where you know the address will first attempt fails. This is useful for cases where you know the address will
eventually be available. The list can contain IPv4, IPv6, or DNS addresses. If eventually be available. The list can contain IPv4, IPv6, or DNS addresses. In
Consul is running on the non-default Serf LAN port, this must be specified as Consul 1.1.0 and later this can be set to a
well. IPv6 must use the "bracketed" syntax. If multiple values are given, they [go-sockaddr](https://godoc.org/github.com/hashicorp/go-sockaddr/template)
are tried and retried in the order listed until the first succeeds. Here are template. If Consul is running on the non-default Serf LAN port, this must be
some examples: specified as well. IPv6 must use the "bracketed" syntax. If multiple values
are given, they are tried and retried in the order listed until the first
succeeds. Here are some examples:
```sh ```sh
# Using a DNS entry # Using a DNS entry
@ -510,17 +537,25 @@ will exit with an error at startup.
with return code 1. By default, this is set to 0 which is interpreted as infinite with return code 1. By default, this is set to 0 which is interpreted as infinite
retries. retries.
* <a name="_join_wan"></a><a href="#_join_wan">`-join-wan`</a> - Address of another * <a name="_join_wan"></a><a href="#_join_wan">`-join-wan`</a> - Address of
wan agent to join upon starting up. This can be another wan agent to join upon starting up. This can be specified multiple
specified multiple times to specify multiple WAN agents to join. If Consul is times to specify multiple WAN agents to join. If Consul is unable to join with
unable to join with any of the specified addresses, agent startup will any of the specified addresses, agent startup will fail. By default, the agent
fail. By default, the agent won't [`-join-wan`](#_join_wan) any nodes when it starts up. won't [`-join-wan`](#_join_wan) any nodes when it starts up.
In Consul 1.1.0 and later this can be set to a
[go-sockaddr](https://godoc.org/github.com/hashicorp/go-sockaddr/template)
template.
* <a name="_retry_join_wan"></a><a href="#_retry_join_wan">`-retry-join-wan`</a> - Similar * <a name="_retry_join_wan"></a><a href="#_retry_join_wan">`-retry-join-wan`</a> - Similar
to [`retry-join`](#_retry_join) but allows retrying a wan join if the first attempt fails. to [`retry-join`](#_retry_join) but allows retrying a wan join if the first attempt fails.
This is useful for cases where we know the address will become available eventually. This is useful for cases where we know the address will become available eventually.
As of Consul 0.9.3 [Cloud Auto-Joining](#cloud-auto-joining) is supported as well. As of Consul 0.9.3 [Cloud Auto-Joining](#cloud-auto-joining) is supported as well.
In Consul 1.1.0 and later this can be set to a
[go-sockaddr](https://godoc.org/github.com/hashicorp/go-sockaddr/template)
template
* <a name="_retry_interval_wan"></a><a href="#_retry_interval_wan">`-retry-interval-wan`</a> - Time * <a name="_retry_interval_wan"></a><a href="#_retry_interval_wan">`-retry-interval-wan`</a> - Time
to wait between [`-join-wan`](#_join_wan) attempts. to wait between [`-join-wan`](#_join_wan) attempts.
Defaults to 30s. Defaults to 30s.