Commit Graph

493 Commits

Author SHA1 Message Date
39e0a0cd0a Merge pull request #1249 from barakmich/sanity_check
Split config into a separate file and add sanity check and test
2014-10-06 20:19:23 -04:00
3ca3c9ad4c Merge pull request #1245 from unihorn/155
main/raft: write addNode ConfChange entries in log when start raft
2014-10-06 17:00:28 -07:00
120b088723 Split config into a separate file and add sanity check and test 2014-10-06 19:42:13 -04:00
45ebfb4217 raft: refine initial entries logic in StartNode 2014-10-06 16:06:01 -07:00
c15c3eab4c etcdserver: move int64Slice into pkg/types/ 2014-10-06 15:12:02 -07:00
e2d8037ded main: use initial-cluster and initial-cluster-state flags
In preperation for adding the ability to join a machine to an existing
cluster force the user to specify whether they expect this to me a new
cluster or an active one.

The error for not specifying the initial-cluster-state is:
```
etcd: initial cluster state unset and no wal found
```
2014-10-06 14:59:25 -07:00
314d425718 main/raft: write addNode ConfChange entries in log when start raft 2014-10-06 14:33:12 -07:00
9e3d045b2b *:discovery hook up 2014-10-06 10:12:42 -07:00
1308c3e809 etcdserver: unexport EtcdServer fields where possible 2014-10-03 13:34:56 -07:00
e5f5fcff48 etcdserver: collapse dir configuration to DataDir 2014-10-03 13:34:49 -07:00
af6b29f291 main: move server configuration to etcdserver package 2014-10-03 13:34:49 -07:00
e4a6c9651a raft: add removed
The usage of removed:
1. tell removed node about its removal explicitly using msgDenied
2. prevent removed node disrupt cluster progress by launching leader election

It is set when apply node removal, or receive msgDenied.
2014-10-01 14:57:38 -07:00
83137f9eba pkg/types: introduce a URLs type
Cleanup the usage of URLs into its own type so we don't have to use a
FlagValue everywhere we have a list of URLs.
2014-10-01 14:41:01 -07:00
073eb7677d etcdserver: move grep member logic into publish func 2014-10-01 11:50:47 -07:00
cbc84bc70e etcdserver: minimize input info 2014-10-01 11:47:17 -07:00
a40a270e19 etcdserver: publish self info when start 2014-10-01 11:47:17 -07:00
34547229a6 etcdserver: fix left Id -> ID 2014-09-29 14:14:45 -07:00
0e8345aa73 Merge pull request #1143 from unihorn/136
*: Id -> ID for protobuf types
2014-09-29 13:58:02 -07:00
89077167c3 etcdserver: add publish func 2014-09-29 10:13:06 -07:00
1d5d2e3726 *: Id -> ID for protobuf types
We use ID instead of Id in this project based on golang conventions.
2014-09-26 11:49:30 -07:00
5e3fd6ee3f etcdserver: introduce the cluster and member
This introduces two new concepts: the cluster and the member.

Members are logical etcd instances that have a name, raft ID, and a list
of peer and client addresses.

A cluster is made up of a list of members.
2014-09-25 18:04:10 -07:00
9b3478218e etcdserver: add RaftIndex and RaftTerm 2014-09-25 16:46:24 -07:00
c28fd92d10 etcdserver: extend storeRecorder to test parameters 2014-09-24 14:33:51 -07:00
172a32e5e3 etcdserver: correct timeout and streaming handling
This reintroduces the 'stream' parameter to support long-lived watch
sessions. These sessions respect a server timeout (set to 5 minutes by
default).
2014-09-24 11:27:36 -07:00
bc7b0108dc raft: ConfigChange -> ConfChange 2014-09-23 12:02:44 -07:00
d92931853e raft: Config -> ConfigChange
Configure -> ProposeConfigChange
AddNode, RemoveNode -> ApplyConfigChange
2014-09-22 23:39:53 -07:00
ec8f493fde raft: refine comments for Configure 2014-09-22 15:44:47 -07:00
dc36ae7058 raft: use pb.Config instead of []byte for Configure 2014-09-22 15:44:47 -07:00
4203569da2 etcdserver: use ConfigType in protobuf 2014-09-22 15:44:46 -07:00
b82d70871f raft: use EntryType in protobuf 2014-09-22 15:44:46 -07:00
abdb2cad15 etcdserver: Config.Id -> Config.ID 2014-09-22 15:44:46 -07:00
aaffb9eb78 etcdserver: add AddNode, RemoveNode
AddNode and RemoveNode is used to propose config change to the cluster.
If succeeds, it will add/remove node from the cluster.
2014-09-22 15:44:46 -07:00
7d1126fb35 etcdserver: init time.Time only if Expiration > 0
golang's concept of "zero" time does not align with the zero value of
a unix timestamp. Initializing time.Time with a unix timestamp of 0
makes time.Time.IsZero fail. Solve this by initializing time.Time only
if we care about the time.
2014-09-22 15:31:31 -07:00
e08df4c8d2 store: fix recursive/dir arguments 2014-09-22 14:44:01 -07:00
91003cb994 *: s/prevExists/prevExist/ 2014-09-18 21:25:08 -07:00
a42d52482c etcdserver: use simple PRNG for GenID 2014-09-17 15:29:14 -07:00
ab61a8aa9a *: init for on disk snap support 2014-09-17 13:56:12 -07:00
023dc7cba2 etcdserver: add SYNC request 2014-09-16 13:42:03 -07:00
8a5ab2ec06 etcdserver: introduce Server interface
This changes etcdserver.Server to an interface, with the former Server
(now "EtcdServer") becoming the canonical/production implementation.
This will facilitate better testing of the http server et al with mock
implementations of the interface.
It also more clearly defines the boundary for users of the Server.
2014-09-15 15:11:01 -07:00
6cd4434ff3 server: add unit tests
Make test coverage >= 90%
2014-09-15 13:16:48 -07:00
f7444ff300 store: convert Watch to interface 2014-09-09 11:17:53 -07:00
d844377ca6 *: vendor context 2014-09-03 20:06:16 -07:00
2ba57ee75d *: remove unused pkgs 2014-09-03 09:20:20 -07:00