3677 Commits

Author SHA1 Message Date
Xiang Li
7fe4385ef9 raft: add comment for Compact interface of Node 2014-10-07 16:03:11 +08:00
Xiang Li
5587e0d73f raft: compact takes index and nodes parameters
Before this commit, compact always compact log at current appliedindex of raft.
This prevents us from doing non-blocking snapshot since we have to make snapshot
and compact atomically. To prepare for non-blocking snapshot, this commit make
compact supports index and nodes parameters. After completing snapshot, the applier
should call compact with the snapshot index and the nodes at snapshot index to do
a compaction at snapsohot index.
2014-10-07 16:03:11 +08:00
Brandon Philips
de024ec844 Merge pull request #1250 from philips/fix-single-node
main: use a new cluster by default
2014-10-06 19:10:58 -07:00
Brandon Philips
6cbc282be1 main: use a new cluster by default
This is a safe default for now. Use it to make `./etcd` work again.
2014-10-06 17:34:14 -07:00
Barak Michener
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
Barak Michener
d6aea2a795 add golint on the new box and fix appropriate lint 2014-10-06 20:16:25 -04:00
Barak Michener
8a311e5b76 remove new cluster check 2014-10-06 20:07:51 -04:00
Barak Michener
1a0195e07e tableize the test 2014-10-06 20:05:53 -04:00
Yicheng Qin
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
Brandon Philips
b9c8ac73be Merge pull request #1248 from jonboulle/disco
main: fix temporary discovery cluster
2014-10-06 16:54:06 -07:00
Barak Michener
120b088723 Split config into a separate file and add sanity check and test 2014-10-06 19:42:13 -04:00
Jonathan Boulle
5098cb0d32 main: fix temporary discovery cluster 2014-10-06 16:10:29 -07:00
Yicheng Qin
45ebfb4217 raft: refine initial entries logic in StartNode 2014-10-06 16:06:01 -07:00
Brandon Philips
d98fe2ce1a Merge pull request #1247 from jonboulle/doc
documentation: clustering guide fixes
2014-10-06 15:16:25 -07:00
Yicheng Qin
c15c3eab4c etcdserver: move int64Slice into pkg/types/ 2014-10-06 15:12:02 -07:00
Jonathan Boulle
a10c62ae25 documentation: clustering guide fixes 2014-10-06 15:07:44 -07:00
Brandon Philips
3500b56e54 Merge pull request #1237 from philips/0.5-docs
use initial-cluster and initial-cluster-state flags
2014-10-06 15:04:04 -07: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
Yicheng Qin
314d425718 main/raft: write addNode ConfChange entries in log when start raft 2014-10-06 14:33:12 -07:00
Jonathan Boulle
7081dabd12 Merge pull request #1244 from jonboulle/peers
main: fail on peers/peers-file flags
2014-10-06 14:25:39 -07:00
Jonathan Boulle
ec7bcbb50d main: fail on peers/peers-file flags 2014-10-06 14:25:11 -07:00
Brandon Philips
6bc160b4e3 Documentation: introduce the initial 0.5 clustering guide
Introduce the concepts of static initial cluster configuration and
document the flag migrations.
2014-10-06 12:25:12 -07:00
Xiang Li
9e3d045b2b *:discovery hook up 2014-10-06 10:12:42 -07:00
Xiang Li
824b7231b8 Merge pull request #1240 from coreos/fix_proposal
raft: fix send
2014-10-06 05:53:54 +08:00
Xiang Li
dc9cb4b4ba raft: fix send
send should not attach current term to msgProp. Send should simply do proxy for msgProp without
changing its term. msgProp has a special term 0, which indicates that it is a local message.
2014-10-06 04:48:35 +08:00
Jonathan Boulle
7ce3bb180c Merge pull request #1238 from jonboulle/etcdserver_cluster
etcdserver: restore test coverage of cluster
2014-10-03 17:06:36 -07:00
Jonathan Boulle
d2df23183d etcdserver: restore test coverage of cluster 2014-10-03 17:06:23 -07:00
Jonathan Boulle
2606508d1c Merge pull request #1215 from jonboulle/1215
Flag `-timeout` not descriptive
2014-10-03 14:06:18 -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
1ca5991c8c Merge pull request #1096 from jonboulle/1096_embedded
simplify initialization of EtcdServer to support embedded etcd
2014-10-03 13:39:25 -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
1c4163faf8 Merge pull request #1187 from jonboulle/1187_watches_header
Watches do not return X-Etcd-Index header
2014-10-03 10:13:25 -07:00
Xiang Li
01ecc60a88 Merge pull request #1203 from coreos/fix_raft
raft: commitIndex=min(leaderCommit, index of last new entry)
2014-10-03 22:24:07 +08:00
Xiang Li
172bd7d096 raft: add test for maybeappend change 2014-10-03 22:21:35 +08:00
Xiang Li
5b291b521b Merge pull request #1207 from coreos/check_stale_resp
raft: do not decrease nextIndex and send entries for stale reply
2014-10-03 13:45:58 +08:00
Xiang Li
70bf464cd6 raft: add comment to decrTo 2014-10-03 13:42:34 +08:00
Xiang Li
16ba77767e raft: do not decrease nextIndex and send entries for stale reply 2014-10-03 13:41:27 +08: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
8490904f20 Merge pull request #1224 from unihorn/149
raft: msg.Denied -> msg.Reject
2014-10-02 12:24:09 -07:00
Yicheng Qin
fff918c672 raft: msg.Denied -> msg.Reject
Change the field name because it has msgDenied already.
2014-10-02 12:22:12 -07:00
Yicheng Qin
4a5bf2e1b7 Merge pull request #1151 from unihorn/138
raft: add removed
2014-10-01 15:01:30 -07:00
Yicheng Qin
b64246720b etcdserver: fix test due to rebase 2014-10-01 14:57:39 -07:00
Yicheng Qin
182c8316e1 raft: refine comment for doc and removed list tests 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
b1fc0feb72 Merge pull request #1221 from philips/fixing-stuff
pkg/types: introduce a URLs type
2014-10-01 14:55:41 -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
Brandon Philips
619c7f9fdb Merge pull request #1220 from bcwaldon/bkcompat
Backwards-compatibility with v0.4.6 addr-related flags
2014-10-01 12:53:50 -07:00
Yicheng Qin
f84b5b1071 Merge pull request #1201 from unihorn/143
etcdserver: publish self info when start
2014-10-01 11:56:20 -07:00