138 Commits

Author SHA1 Message Date
Barak Michener
120b088723 Split config into a separate file and add sanity check and test 2014-10-06 19:42:13 -04:00
Brandon Philips
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
Xiang Li
9e3d045b2b *:discovery hook up 2014-10-06 10:12:42 -07:00
Jonathan Boulle
d2df23183d etcdserver: restore test coverage of cluster 2014-10-03 17:06:23 -07:00
Jonathan Boulle
f432b9d29b etcdhttp: remove configurable timeout
It's slightly unclear why we expose this timeout as being configurable,
and the `-timeout` flag does not exist in 0.4.x, so for now, remove the
flag until we have evidence that it is needed.
2014-10-03 13:47:34 -07:00
Jonathan Boulle
1308c3e809 etcdserver: unexport EtcdServer fields where possible 2014-10-03 13:34:56 -07:00
Jonathan Boulle
e5f5fcff48 etcdserver: collapse dir configuration to DataDir 2014-10-03 13:34:49 -07:00
Jonathan Boulle
af6b29f291 main: move server configuration to etcdserver package 2014-10-03 13:34:49 -07:00
Jonathan Boulle
1c11f6a144 *: expose etcd-index in watch requests
This adds a StartIndex field to the Watcher interface, which represents
the Etcd-Index at which the Watcher is created.

Also refactors the HTTP tests to use a table for most handleWatch tests
2014-10-02 18:10:11 -07:00
Yicheng Qin
b64246720b etcdserver: fix test due to rebase 2014-10-01 14:57:39 -07:00
Yicheng Qin
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
Brandon Philips
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
Yicheng Qin
073eb7677d etcdserver: move grep member logic into publish func 2014-10-01 11:50:47 -07:00
Yicheng Qin
cbc84bc70e etcdserver: minimize input info 2014-10-01 11:47:17 -07:00
Yicheng Qin
a40a270e19 etcdserver: publish self info when start 2014-10-01 11:47:17 -07:00
Brandon Philips
04bd48fef3 etcdserver: stop worrying about scheme
Stop worrying about the scheme. This puts a TODO on adding validation to
the schemes if TLS is specified. But we can worry about that later.
2014-09-30 17:05:20 -07:00
Brandon Philips
c2f96631d3 etcdserver: stop using addScheme
This standardizes the flags to use a list of URLs everywhere. The next
step is to enforce the scheme based on TLS settings and support compat
flags.
2014-09-30 16:40:32 -07:00
Brandon Philips
aa5b6cdc9e etcdserver: have newMember take an optional time field
This will be used by members joining an existing cluster or joining
using discovery.
2014-09-30 14:57:04 -07:00
Yicheng Qin
34547229a6 etcdserver: fix left Id -> ID 2014-09-29 14:14:45 -07:00
Yicheng Qin
0e8345aa73 Merge pull request #1143 from unihorn/136
*: Id -> ID for protobuf types
2014-09-29 13:58:02 -07:00
Yicheng Qin
08e5f39d8a Merge pull request #1192 from unihorn/140
etcdserver: add publish func
2014-09-29 10:20:39 -07:00
Yicheng Qin
89077167c3 etcdserver: add publish func 2014-09-29 10:13:06 -07:00
Yicheng Qin
5784693a39 etcdserver: Cluster.Endpoints() -> Cluster.PeerURLs() 2014-09-28 14:39:47 -07:00
Yicheng Qin
e83f851995 etcdserver: move cluster test from etcdhttp to etcdserver 2014-09-28 14:35:48 -07:00
Yicheng Qin
15798a73d9 etcdserver: return client urls for /v2/machines 2014-09-26 16:50:15 -07:00
Yicheng Qin
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
Brandon Philips
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
Jonathan Boulle
9b3478218e etcdserver: add RaftIndex and RaftTerm 2014-09-25 16:46:24 -07:00
Xiang Li
aab41f06d0 elog: remove elog 2014-09-25 11:33:10 -07:00
Xiang Li
45f71af33e pkg: move testutil to pkg 2014-09-25 10:40:40 -07:00
Jonathan Boulle
2da1010cf7 etcdhttp: make TTL= equivalent to unset, and TTL=0 expire 2014-09-24 17:41:44 -07:00
Jonathan Boulle
fa762e6b25 etcdhttp: process dir parameter in request 2014-09-24 17:11:28 -07:00
Jonathan Boulle
98561f6b5d Merge pull request #1158 from jonboulle/1158_unset_ttl
"unsetting" a TTL fails
2014-09-24 17:01:50 -07:00
Jonathan Boulle
20ac7d6732 Merge pull request #1157 from jonboulle/1019_etcdserver
etcdserver: extend storeRecorder to test parameters
2014-09-24 16:58:57 -07:00
Jonathan Boulle
2b52384e7e etcdhttp: allow empty values for TTL parameter 2014-09-24 16:44:55 -07:00
Jonathan Boulle
c2ced7dc70 etcdserver: add tests for Set and Dir=true/false 2014-09-24 15:57:06 -07:00
Jonathan Boulle
ef0ba361df etcdhttp: add test for expiration time 2014-09-24 15:46:40 -07:00
Jonathan Boulle
2e2cd12407 etcdhttp: disallow empty prevValue fields 2014-09-24 15:21:18 -07:00
Jonathan Boulle
c28fd92d10 etcdserver: extend storeRecorder to test parameters 2014-09-24 14:33:51 -07:00
Jonathan Boulle
c8c55aa378 scripts: consolidate and standardize protobuf generation 2014-09-24 13:45:00 -07:00
Jonathan Boulle
a9caa24f8a etcdhttp: add test for streaming watches 2014-09-24 11:27:36 -07:00
Jonathan Boulle
ddc30c0a33 etcdserver: use Context to communicate timeout, and add tests 2014-09-24 11:27:36 -07:00
Jonathan Boulle
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
Jonathan Boulle
e97134e767 etcdserver: eliminate race in sync test 2014-09-23 15:49:20 -07:00
Jonathan Boulle
b85ad9bbc2 Merge pull request #1082 from jonboulle/1082_x_etcd_index
X-Etcd-Index returns the node's modifiedIndex
2014-09-23 15:14:21 -07:00
Yicheng Qin
dcdc7913c0 Merge pull request #1100 from unihorn/129
raft: add Configure
2014-09-23 13:50:10 -07:00
Yicheng Qin
c6cb635e01 etcdserver: refine comments of config change tests 2014-09-23 13:03:30 -07:00
Yicheng Qin
bc7b0108dc raft: ConfigChange -> ConfChange 2014-09-23 12:02:44 -07:00
Brian Waldon
99e9f561ee etcdserver: add Peers.Addrs 2014-09-23 10:56:41 -07:00
Brian Waldon
10220335f7 etcdserver: determine scheme based on TLSClientConfig 2014-09-23 10:14:12 -07:00