Commit Graph

3626 Commits (54b07d7974d020c0d202a8cd419a816076ddbb9a)

Author SHA1 Message Date
Ben Darnell 54b07d7974 Remove raft.loadEnts and the ents parameter to raft.RestartNode.
The initial entries are now provided via the Storage interface.
2014-11-12 18:31:19 -05:00
Ben Darnell 147fd614ce The initial term=0 log entry is now initially unstable.
This entry is now persisted through the normal flow instead of appearing
in the stored log at creation time.  This is how things worked before
the Storage interface was introduced. (see coreos/etcd#1689)
2014-11-12 18:24:16 -05:00
Ben Darnell 76a3de9a33 Require a non-nil Storage parameter in newLog.
Callers must in general have a reference to their Storage objects to
transfer entries from Ready to Storage, so it doesn't make sense to
create a hidden Storage for them.

By explicitly creating Storage objects in tests we can remove a
few casts of raftLog's storage field.
2014-11-12 16:38:50 -05:00
Ben Darnell 25b6590547 raft: introduce log storage interface.
This change splits the raftLog.entries array into an in-memory
"unstable" list and a pluggable interface for retrieving entries that
have been persisted to disk. An in-memory implementation of this
interface is provided which behaves the same as the old version;
in a future commit etcdserver could replace the MemoryStorage with
one backed by the WAL.
2014-11-10 17:40:39 -05:00
Xiang Li ac77971f99 Merge pull request #1671 from xiang90/proxy_doc
doc: add doc for proxy
2014-11-10 13:39:03 -08:00
Jonathan Boulle 645cfb8355 Merge pull request #1681 from jonboulle/fix_exit
etcdmain: do not exit inappropriately
2014-11-10 12:34:36 -08:00
Jonathan Boulle e1e454f138 etcdmain: do not exit inappropriately 2014-11-10 12:34:14 -08:00
Xiang Li a0002d0598 doc: add fallback to discovery section in clustering.md 2014-11-10 12:14:19 -08:00
Jonathan Boulle 99aa2caa3d Merge pull request #1680 from jonboulle/fix_errors
etcdmain: actually return errors
2014-11-10 12:04:05 -08:00
Jonathan Boulle 8799679083 etcdmain: actually return errors 2014-11-10 11:59:59 -08:00
Yicheng Qin 2dcd8213e4 Merge pull request #1670 from yichengq/207
integration: add basic discovery tests
2014-11-10 10:30:20 -08:00
Yicheng Qin 5396037450 integration: add basic discovery tests 2014-11-10 10:04:30 -08:00
Xiang Li 1e299d8232 doc: add doc for proxy 2014-11-08 19:59:24 -08:00
Jonathan Boulle 8870b739b3 Merge pull request #1661 from jonboulle/wal_errors
wal: propagate errors
2014-11-08 17:16:48 -08:00
Jonathan Boulle 5a964f49a5 wal: propagate errors 2014-11-08 17:16:23 -08:00
Jonathan Boulle aca58ec605 Merge pull request #1655 from jonboulle/wal_logic
etcdserver: collapse shared readWAL logic
2014-11-08 17:07:43 -08:00
Jonathan Boulle 41757e7f78 etcdserver: collapse shared readWAL logic 2014-11-08 17:07:05 -08:00
Yicheng Qin f333c7ff87 Merge pull request #1668 from yichengq/214
integration: wait cluster to be stable before return launch
2014-11-08 15:54:31 -08:00
Yicheng Qin 071ebb9feb integration: wait cluster to be stable before return launch
The wait ensures that cluster goes into the stable stage, which means that
leader has been elected and starts to heartbeat to followers.

This makes future client requests always handled in time, and there is no
need to retry sending requests.
2014-11-08 15:39:10 -08:00
Yicheng Qin aa72cda7b2 Merge pull request #1667 from yichengq/213
etcdserver: not get cluster info from self peer urls
2014-11-08 14:05:20 -08:00
Yicheng Qin 4b9c3a9102 etcdserver: not get cluster info from self peer urls
Self peer urls have not started to serve at the time that it tries to
get cluster info, so it is useless to get cluster info from self peer
urls.
2014-11-08 13:52:48 -08:00
Brandon Philips 0b493ac8d4 version: bump to alpha.2 2014-11-07 16:44:02 -08:00
Jonathan Boulle c73d41d98b Merge pull request #1658 from jonboulle/doc_etcdctl_backup
Add doc for backup and force-new-cluster
2014-11-07 16:39:45 -08:00
Jonathan Boulle 3d2f65fc0d docs: clarify rewriting 2014-11-07 16:35:33 -08:00
Jonathan Boulle 6b283f6ea1 docs: reword failure descriptions 2014-11-07 16:34:19 -08:00
Jonathan Boulle 4367c9a1db docs: no need to stop etcd while doing backup 2014-11-07 16:25:38 -08:00
Yicheng Qin c9894687fc Merge pull request #1662 from yichengq/211
etcdserver: fix data race in cluster
2014-11-07 16:20:59 -08:00
Jonathan Boulle a56fa60fb4 doc: add backup/restore guide 2014-11-07 16:14:45 -08:00
Yicheng Qin 014ef0f52d etcdserver: fix data race in cluster
The data race happens when etcd updates member attributes and fetches
member info in http handler at the same time.
2014-11-07 16:13:07 -08:00
Yicheng Qin 2fc47034ee Merge pull request #1660 from yichengq/209
etcdserver: not add sender when it has existed
2014-11-07 16:10:50 -08:00
Yicheng Qin 46cbfbc630 etcdserver: not add sender when it has existed 2014-11-07 14:05:00 -08:00
Jonathan Boulle d3fd10798b Merge pull request #1656 from jonboulle/1656_sender_garbage
sender logs garbage
2014-11-07 13:44:18 -08:00
Jonathan Boulle a6ba4d357c Merge pull request #1474 from jonboulle/1474_print_peers
print out remote peers' information and config change in the cluster
2014-11-07 13:39:32 -08:00
Yicheng Qin e707af7c3a Merge pull request #1654 from yichengq/208
integration: use client to do requests
2014-11-07 13:37:14 -08:00
Jonathan Boulle ca06fd0060 etcdserver: log cluster when adding/removing node 2014-11-07 13:36:41 -08:00
Jonathan Boulle 958ade86a5 etcdserver: log message after loading peers from snapshot 2014-11-07 13:34:43 -08:00
Yicheng Qin 85a4477f71 integration: use client to do requests 2014-11-07 13:34:30 -08:00
Jonathan Boulle 38ec84693f etcdserver: clean up sender error message 2014-11-07 13:32:44 -08:00
Xiang Li 78865aa7f7 Merge pull request #1657 from xiangli-cmu/backup
*: add ctl backup support
2014-11-07 13:30:54 -08:00
Xiang Li 0d541e6338 *: add ctl backup support 2014-11-07 13:27:44 -08:00
Brian Waldon 5f6e536be8 Merge pull request #1639 from bcwaldon/etcdctl-tls
Wire up TLS flags for etcdctl
2014-11-07 13:19:36 -08:00
Jonathan Boulle 4f85a68c25 Merge pull request #1650 from jonboulle/build_release
scripts: clean build-release script a bit
2014-11-07 12:51:30 -08:00
Jonathan Boulle c3aae88b0c Merge pull request #1653 from jonboulle/server_order
etcdserver: re-order ServerConfig fields
2014-11-07 12:28:29 -08:00
Jonathan Boulle 32a82bb423 Merge pull request #1651 from jonboulle/discard
etcdserver: discard log output in tests
2014-11-07 12:05:40 -08:00
Jonathan Boulle 285cd404e3 etcdserver: print peerURLs when adding member 2014-11-07 12:00:41 -08:00
Jonathan Boulle a607e097c6 etcdserver: re-order ServerConfig fields 2014-11-07 11:45:59 -08:00
Jonathan Boulle 55b4ff0cdf etcdserver: discard log output in tests 2014-11-07 11:45:46 -08:00
Jonathan Boulle 82094f05e0 scripts: clean build-release script a bit 2014-11-07 11:45:40 -08:00
Jonathan Boulle c4f273478d Merge pull request #1652 from jonboulle/fix_tests
etcdserver: sort IDs and s/getIDset/getIDs/
2014-11-07 11:43:51 -08:00
Jonathan Boulle 14e1442d2d etcdserver: sort IDs and s/getIDset/getIDs/ 2014-11-07 10:57:42 -08:00