Commit Graph

23 Commits

Author SHA1 Message Date
Sean Chittenden 6bda2c007c Add a flag to denote that a server is disabled
A server is not normally disabled, but in the event of an RPC error, we want to mark a server as down to allow for fast failover to a different server.  This value must be an int in order to support atomic operations.

Additionally, this is the preliminary work required to bring up a server in a disabled state.  RPC health checks in the future could mark the server as alive, thereby creating an organic "slow start" feature for Consul.
2016-03-23 16:14:59 -07:00
James Phillips 18e12aa886 Adds more specific checks for ipv6 addresses. 2016-03-19 16:14:45 -07:00
Wim 508bc796a8 Allow [::] as a bind address (binds to first public IPv6 address) 2016-03-18 23:59:44 +01:00
Sean Chittenden c470553b6b Factor out duplicate functions into a lib package
Consolidate code duplication and tests into a single lib package.  Most of these functions were from various **/util.go functions that couldn't be imported due to cyclic imports.  The consul/lib package is intended to be a terminal node in an import DAG and a place to stash various consul-only helper functions.  Pulled in hashicorp/go-uuid instead of consolidating UUID access.
2016-01-29 16:57:45 -08:00
James Phillips e0ae4878f6 Merge pull request #948 from hashicorp/iface-down-fix
Don't try to bind on address from inactive interface
2016-01-14 17:00:54 -08:00
James Phillips 5449096bc2 Adds a check for the minimum version as well. 2015-10-27 15:56:36 -07:00
James Phillips c1305a08ea Makes the version upshift code look at the correct version field. 2015-10-27 14:44:34 -07:00
William Tisäter 4267814e5b Treat 127.0.0.0/8 and 169.254.0.0/16 as private network 2015-09-02 12:24:14 +02:00
Mac Browning 04eb37ffb6 consul: refactor GetPrivateIP for testability 2015-08-15 17:44:32 -04:00
Tiru Srikantha f1932e5e46 Add RFC 6598 private IP range
Fixes #1031 by adding 100.64.0.0/10 as a private IP range.
2015-06-19 12:20:30 -07:00
Armon Dadgar e5c8fce96a consul: adding randomStagger util method 2015-05-14 17:59:11 -07:00
Emil Hessman 0222ed9eb9 Fix missing arguments 2014-11-01 22:56:48 +01:00
William Tisäter 75e631ee94 Add helper for lowercase list of strings 2014-07-23 23:42:21 +02:00
Robert Xu fff6546c75 Minor cleanup to logic and testsuite.
Signed-off-by: Robert Xu <robxu9@gmail.com>
2014-06-18 18:47:05 -04:00
Robert Xu 31c392813c Add expect bootstrap '-expect=n' mode.
This allows for us to automatically bootstrap a cluster of nodes after
'n' number of server nodes join. All servers must have the same 'n' set, or
they will fail to join the cluster; all servers will not join the peer set
until they hit 'n' server nodes.

If the raft commit index is not empty, '-expect=n' does nothing because it
thinks you've already bootstrapped.

Signed-off-by: Robert Xu <robxu9@gmail.com>
2014-06-16 17:40:33 -04:00
Armon Dadgar 589105eee4 consul: Store the protocol version for a server 2014-05-28 16:32:24 -07:00
Armon Dadgar c8831db91c consul: Adding Addr to serverParts 2014-05-28 16:32:24 -07:00
Armon Dadgar 00477dca21 consul: Adding util method to generate a UUID 2014-05-20 16:25:27 -07:00
Armon Dadgar 1ecdeae1b6 consul: Update for serf 0.4 2014-01-30 13:13:29 -08:00
Armon Dadgar 3e6787511e change isConsulServer to parse flags 2014-01-20 13:39:07 -10:00
Armon Dadgar 6992e8bf61 Fixing some tests 2014-01-09 17:22:01 -08:00
Armon Dadgar f7eb948ae1 Methods to get a private IP 2013-12-31 15:44:17 -08:00
Armon Dadgar e1c927f218 Adding ability to list services 2013-12-12 11:07:14 -08:00