Commit Graph

37 Commits

Author SHA1 Message Date
Armon Dadgar 200b348f69 consul: Disable tombstones as follower 2015-01-05 14:58:59 -08:00
Armon Dadgar a350ec9379 consul: Mesure time for reapTombstones 2015-01-05 14:43:56 -08:00
Armon Dadgar 9152fae109 consul: First pass at tombstone reaping 2015-01-05 14:43:55 -08:00
Armon Dadgar 8681d913ba consul: Generate a raft operation to reap tombstones 2015-01-05 14:43:55 -08:00
Armon Dadgar 9f30ffbf9a consul: Leader should reset the tombstone GC clock 2015-01-05 14:43:55 -08:00
Armon Dadgar 5b6ce2ca4a consul: Setup ACLs and timers after initial barrier 2014-12-12 21:42:24 -08:00
Armon Dadgar 990ad02f83 consul: Minor cleanups 2014-12-12 15:43:34 -08:00
Atin Malaviya b623af776b 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 d74f79b3fa consul: Enforce service registration ACLs 2014-11-30 21:05:15 -07:00
Armon Dadgar 5c46544e7e consul: Improve variable name 2014-10-14 11:04:43 -07:00
Armon Dadgar e33b6683aa consul: Reap left members ignoring state. Fixes #371 2014-10-14 11:02:26 -07:00
Armon Dadgar b6c5d77cf8 consul: Fixing graceful leave of current leader. Fixes #360. 2014-10-13 22:14:43 -07:00
Armon Dadgar e51f9da84b consul: Deprecate ACLForceSet 2014-10-09 12:28:07 -07:00
Armon Dadgar 5da5df716d consul: Create anonymous and master tokens 2014-08-18 15:46:22 -07:00
Robert Xu a2fea2ce55 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 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 cae158b310 consul: Provide output for serfHealth check. Fixes #176. 2014-06-09 16:07:22 -07:00
Armon Dadgar 5c34e01d17 consul: Fixing for upstream API changes 2014-05-01 18:11:36 -07:00
Armon Dadgar 63ce30acd4 consul: Adding reconcilation to handle reaped Serf nodes. Fixes #15. 2014-04-03 15:51:09 -07:00
Armon Dadgar 277c31d813 consul: Handle reaping of serf members 2014-03-20 12:51:49 -07:00
Armon Dadgar 4833c7995e consul: Handle API changes in StateStore 2014-03-05 15:03:12 -08:00
Armon Dadgar 7294305df9 consul: Adding telemetry 2014-02-20 15:16:26 -08:00
Armon Dadgar f9da9fe1b5 consul: Use serf event to announce new leader 2014-02-19 12:36:27 -08:00
Armon Dadgar 369193fbd6 consul: updating state store to associate changes with raft index 2014-02-04 18:33:15 -08:00
Armon Dadgar 1ecdeae1b6 consul: Update for serf 0.4 2014-01-30 13:13:29 -08:00
Armon Dadgar 334c2137ef Preventing multiple nodes in bootstrap mode from adding each other as Raft peers 2014-01-20 13:56:29 -10:00
Armon Dadgar 3e6787511e change isConsulServer to parse flags 2014-01-20 13:39:07 -10:00
Armon Dadgar ed8cb1bc2b Export the consul service id and name 2014-01-15 17:27:37 -10:00
Armon Dadgar ea41b2bb26 Export the serf check ID 2014-01-15 17:24:16 -10:00
Armon Dadgar 80d9899aec Do not remove ourself when we leave from Raft 2014-01-10 15:05:34 -08:00
Armon Dadgar 2030b2288d Simplify Raft peer adds using only reconciliation 2014-01-10 12:55:55 -08:00
Armon Dadgar c5e2004be9 Log cleanup 2014-01-10 11:06:11 -08:00
Armon Dadgar c2ef218c30 Improve idempotence check for consul service registration 2014-01-09 22:12:08 -08:00
Armon Dadgar 79717c95bf Fixing issue that would prevent consul server registration 2014-01-09 17:59:31 -08:00
Armon Dadgar 26134960b1 Auto-register the consul service 2014-01-09 17:57:13 -08:00
Armon Dadgar 688a0d5bf1 Testing leader functions and reconciliation 2014-01-09 17:46:33 -08:00
Armon Dadgar 9d96ce1107 First pass at Serf reconciliation 2014-01-09 15:49:09 -08:00