49 Commits

Author SHA1 Message Date
Sean Chittenden
7cdc056ca5 Rename server_details package to agent 2016-03-29 17:39:19 -07:00
Sean Chittenden
0925b26250 Refactor consul.serverParts into server_details.ServerDetails
This may be short-lived, but it also seems like this is going to lead us down a path where ServerDetails is going to evolve into a more powerful package that will encapsulate more behavior behind a coherent API.
2016-03-23 16:15:47 -07:00
James Phillips
785bf6678d Gets rid of error prefixing in leader.go. 2015-10-20 13:37:11 -07:00
James Phillips
b6f9aee847 Fixes remaining non-KV index calclulations and adds a general getWatchTables thing. 2015-10-15 14:59:09 -07:00
James Phillips
51600fab08 Gets rid of the transitional "New" suffix on state store and RPC. 2015-10-15 14:59:09 -07:00
James Phillips
5b6502c1ea Integrates new state store into leader and catalog/health endpoints. 2015-10-15 14:59:09 -07:00
James Phillips
009fd7d9f5 Integrates new state store for ACLs. 2015-10-15 14:59:09 -07:00
Dale Wijnand
5a28ebcaa3 Fix a bunch of typos. 2015-09-15 13:22:08 +01:00
Anthony Scalisi
10e028d599 remove various typos 2015-09-11 12:29:54 -07:00
Armon Dadgar
b4531164e9 consul: updating for Raft API changes 2015-05-08 11:35:52 -07:00
Armon Dadgar
8b8abe2268 consul: fixing overly redundant logging 2015-05-05 13:00:47 -07:00
Armon Dadgar
6446df65bf consul: Do not remove ourself as raft peer in Serf event handler 2015-01-20 16:13:54 -08:00
Armon Dadgar
d842b6da74 consul: Disable tombstones as follower 2015-01-05 14:58:59 -08:00
Armon Dadgar
eb2df41171 consul: Mesure time for reapTombstones 2015-01-05 14:43:56 -08:00
Armon Dadgar
bf74361fa7 consul: First pass at tombstone reaping 2015-01-05 14:43:55 -08:00
Armon Dadgar
76e5237356 consul: Generate a raft operation to reap tombstones 2015-01-05 14:43:55 -08:00
Armon Dadgar
1120e6fcbd consul: Leader should reset the tombstone GC clock 2015-01-05 14:43:55 -08:00
Armon Dadgar
a886e8e561 consul: Setup ACLs and timers after initial barrier 2014-12-12 21:42:24 -08:00
Armon Dadgar
bb1ba3a167 consul: Minor cleanups 2014-12-12 15:43:34 -08:00
Atin Malaviya
4732c36d88 Consul Session TTLs
The design of the session TTLs is based on the Google Chubby approach
(http://research.google.com/archive/chubby-osdi06.pdf). The Session
struct has an additional TTL field now. This attaches an implicit
heartbeat based failure detector. Tracking of heartbeats is done by
the current leader and not persisted via the Raft log. The implication
of this is during a leader failover, we do not retain the last
heartbeat times.

Similar to Chubby, the TTL represents a lower-bound. Consul promises
not to terminate a session before the TTL has expired, but is allowed
to extend the expiration past it. This enables us to reset the TTL on
a leader failover. The TTL is also extended when the client does a
heartbeat. Like Chubby, this means a TTL is extended on creation,
heartbeat or failover.

Additionally, because we must account for time requests are in transit
and the relative rates of clocks on the clients and servers, Consul
will take the conservative approach of internally multiplying the TTL
by 2x. This helps to compensate for network latency and clock skew
without violating the contract.

Reference: https://docs.google.com/document/d/1Y5-pahLkUaA7Kz4SBU_mehKiyt9yaaUGcBTMZR7lToY/edit?usp=sharing
2014-12-07 12:38:22 -05:00
Armon Dadgar
cafba93869 consul: Enforce service registration ACLs 2014-11-30 21:05:15 -07:00
Armon Dadgar
af4a955037 consul: Improve variable name 2014-10-14 11:04:43 -07:00
Armon Dadgar
e39d2ee675 consul: Reap left members ignoring state. Fixes #371 2014-10-14 11:02:26 -07:00
Armon Dadgar
d3c3d9a1be consul: Fixing graceful leave of current leader. Fixes #360. 2014-10-13 22:14:43 -07:00
Armon Dadgar
e6ed387f42 consul: Deprecate ACLForceSet 2014-10-09 12:28:07 -07:00
Armon Dadgar
827e7c9efa consul: Create anonymous and master tokens 2014-08-18 15:46:22 -07:00
Robert Xu
bc4a4fe09b Utilise new raft.SetPeers() method, move expect logic to leader.go.
This way, we don't use EnableSingleMode, nor cause chaos adding peers.

Signed-off-by: Robert Xu <robxu9@gmail.com>
2014-06-18 12:03:30 -04:00
Robert Xu
c60fd0542a 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
476339b20c consul: Provide output for serfHealth check. Fixes #176. 2014-06-09 16:07:22 -07:00
Armon Dadgar
888ce89b91 consul: Fixing for upstream API changes 2014-05-01 18:11:36 -07:00
Armon Dadgar
ed39e90e3a consul: Adding reconcilation to handle reaped Serf nodes. Fixes #15. 2014-04-03 15:51:09 -07:00
Armon Dadgar
ad8e25917b consul: Handle reaping of serf members 2014-03-20 12:51:49 -07:00
Armon Dadgar
98fffdacb5 consul: Handle API changes in StateStore 2014-03-05 15:03:12 -08:00
Armon Dadgar
889297dc99 consul: Adding telemetry 2014-02-20 15:16:26 -08:00
Armon Dadgar
7123c6315b consul: Use serf event to announce new leader 2014-02-19 12:36:27 -08:00
Armon Dadgar
67a7d25e1c consul: updating state store to associate changes with raft index 2014-02-04 18:33:15 -08:00
Armon Dadgar
fe0efdfa75 consul: Update for serf 0.4 2014-01-30 13:13:29 -08:00
Armon Dadgar
28a9598c91 Preventing multiple nodes in bootstrap mode from adding each other as Raft peers 2014-01-20 13:56:29 -10:00
Armon Dadgar
01c73ee9ae change isConsulServer to parse flags 2014-01-20 13:39:07 -10:00
Armon Dadgar
4ee8bde861 Export the consul service id and name 2014-01-15 17:27:37 -10:00
Armon Dadgar
9d34893992 Export the serf check ID 2014-01-15 17:24:16 -10:00
Armon Dadgar
0cdd9071aa Do not remove ourself when we leave from Raft 2014-01-10 15:05:34 -08:00
Armon Dadgar
cf29019545 Simplify Raft peer adds using only reconciliation 2014-01-10 12:55:55 -08:00
Armon Dadgar
4c992a88c1 Log cleanup 2014-01-10 11:06:11 -08:00
Armon Dadgar
27320017b9 Improve idempotence check for consul service registration 2014-01-09 22:12:08 -08:00
Armon Dadgar
5c6596fa8a Fixing issue that would prevent consul server registration 2014-01-09 17:59:31 -08:00
Armon Dadgar
8c6f03ad07 Auto-register the consul service 2014-01-09 17:57:13 -08:00
Armon Dadgar
0f0f29eb31 Testing leader functions and reconciliation 2014-01-09 17:46:33 -08:00
Armon Dadgar
c0029c6967 First pass at Serf reconciliation 2014-01-09 15:49:09 -08:00