362 Commits

Author SHA1 Message Date
Xiang Li
eb0d80767e etcdserver: better logging for clusterFromPeerURLs 2014-11-06 14:28:07 -08:00
Xiang Li
3cb885c6b2 etcdhttp: return 409 instead of 412 when there is a conflict when adding a member 2014-11-06 11:07:25 -08:00
Xiang Li
4ed60471fe Merge pull request #1627 from xiangli-cmu/validate_peer_url
etcdserver: validate peerurl when adding members
2014-11-06 10:43:22 -08:00
Xiang Li
bd2b18b6de etcdserver: validate peerurl when adding members 2014-11-05 23:12:48 -08:00
Jonathan Boulle
68bca981de discovery: simplify interface
There's no real need to expose a Discoverer interface/struct when the
only use of the interface (and indeed the module) is to invoke a single
function. This isn't Java, after all. So instead, simplify to Discovery
exposing just two functions: JoinCluster (i.e. what was formerly called
"discovery"), and GetCluster (hitherto "ProxyDiscovery")
2014-11-05 22:45:01 -08:00
Xiang Li
6fdbb086f4 Merge pull request #1623 from xiangli-cmu/valid_configuration
Valid configuration
2014-11-05 18:13:04 -08:00
Xiang Li
99b1af40c6 etcdserver: move config validation to cluster 2014-11-05 17:55:07 -08:00
Xiang Li
98406af448 cluster: separate out membersFromStore from newClusterFromStore 2014-11-05 15:56:43 -08:00
Yicheng Qin
6c9169b4f4 etcdserver: improve panic message in Cluster 2014-11-05 15:39:28 -08:00
Xiang Li
3fc6f9c24f Merge pull request #1586 from xiangli-cmu/fix_node
*: add Advance interface to raft.Node
2014-11-05 15:09:51 -08:00
Xiang Li
0d7c43d885 *: add a Advance interface to raft.Node
Node set the applied to committed right after it sends out Ready to application. This is not
correct since the application has not actually applied the entries at that point. We add a
Advance interface to Node. Application needs to call Advance to tell raft Node its progress.
Also this change can avoid unnecessary copying when application is still applying entires but
there are more entries to be applied.
2014-11-05 15:04:14 -08:00
Yicheng Qin
c5140d5c18 Merge pull request #1614 from yichengq/194
*: handle panic and fatal organizedly
2014-11-05 14:08:35 -08:00
Yicheng Qin
791b2fd503 *: handle panic and fatal more consistently
1. etcd fatals if there is critical error in the system and operator should
do something for it
2. etcd panics if there happens something unexpected, and it should be
reported to us to debug.
2014-11-05 13:53:24 -08:00
Jonathan Boulle
89eac70d09 proxy: add docstrings 2014-11-05 10:30:05 -08:00
Xiang Li
f71c247d87 Merge pull request #1604 from xiangli-cmu/fallback_proxy
*: support discovery fallback
2014-11-04 16:41:28 -08:00
Jonathan Boulle
e4d0c25365 etcdserver: log adding and removing nodes 2014-11-04 15:05:15 -08:00
Xiang Li
5cb13fd071 *: support discovery fallback 2014-11-04 14:30:22 -08:00
Jonathan Boulle
0f7add9722 etcdhttp: fix typo in test comment 2014-11-04 12:57:59 -08:00
Jonathan Boulle
cedcc0d8df etchttp: return 410 gone for permanently removed members 2014-11-04 11:21:24 -08:00
Yicheng Qin
ac49e1d50f Merge pull request #1594 from unihorn/201
etcdhttp/etcdserver: support HEAD on /v2/keys/ namespace
2014-11-04 00:11:47 -08:00
Yicheng Qin
866ec5948c etcdhttp/etcdserver: support HEAD on /v2/keys/ namespace 2014-11-04 00:06:49 -08:00
Yicheng Qin
2235b47030 Merge pull request #1545 from unihorn/197
etcdhttp: always respond json-format error to client
2014-11-03 23:25:14 -08:00
Yicheng Qin
e4b12a8e28 Merge pull request #1593 from unihorn/200
etcdserver: print out initial cluster members
2014-11-03 22:23:40 -08:00
Yicheng Qin
9aefb91531 etcdhttp: always respond json-format error to client 2014-11-03 22:19:17 -08:00
Yicheng Qin
5ed5d44652 etcdserver: print out initial cluster members
It is moved from etcdmain pkg because the line should only be printed out
when etcd bootstraps at the first time.
2014-11-03 19:34:24 -08:00
Jonathan Boulle
ab69c2adbd etcdhttp: use EcodePrevValueRequired when appropriate 2014-11-03 16:12:50 -08:00
Yicheng Qin
5da481213e Merge pull request #1478 from unihorn/190
etcdserver: panic on storage error
2014-11-03 11:07:55 -08:00
Yicheng Qin
433b4138c5 etcdserver: panic on storage error
It is a critical error to etcd, and etcd is not able to recover it now.
2014-11-03 10:46:04 -08:00
Brian Waldon
6e038e02a6 etcdserver: fix logging of IDs 2014-10-31 12:26:53 -07:00
Xiang Li
eb472b7745 etcdserver: better logging when member is removed 2014-10-31 12:00:50 -07:00
Yicheng Qin
e02ef6b141 Merge pull request #1546 from unihorn/198
etcdserver: better logging for assign ids from upstream
2014-10-31 11:13:43 -07:00
Yicheng Qin
2c5f062b7f etcdserver: better logging for assign ids from upstream 2014-10-31 11:06:31 -07:00
Jonathan Boulle
9726d3909c etcdhttp: bump default Server timeout to 5 mins 2014-10-31 10:52:46 -07:00
Jonathan Boulle
55c92ad456 *: create ID type
This creates a simple ID type (wrapped around uint64) to provide for
standard serialization/deserialization to a string (i.e. base 16
encoded). This replaces strutil so now that package is removed.
2014-10-31 10:34:07 -07:00
Yicheng Qin
aa50af1c69 *: clean log.Print
1. only log things by default that the operator of etcd may need to react to
2. put package name at the head of log lines
2014-10-30 18:15:53 -07:00
Xiang Li
0f8b035253 etcdserver: fix sender logging 2014-10-30 18:00:00 -07:00
Xiang Li
02ff59514f etcdhttp: fix logging in raft handler 2014-10-30 17:39:01 -07:00
Xiang Li
9a56001d63 Merge pull request #1537 from xiangli-cmu/cluster-token
Cluster token
2014-10-30 17:09:25 -07:00
Yicheng Qin
ac71ad92af Merge pull request #1452 from unihorn/187
etcdserver: exit program when node is removed
2014-10-30 15:32:26 -07:00
Yicheng Qin
ed30b6deca etcdserver: exit program when node is removed
Originally added in 400dd2d7bce39851220899bb6d98086583e73ead,
and removed by mistake when refactor cluster.
2014-10-30 15:31:58 -07:00
Xiang Li
3dfb6723b2 *: rename initial-cluster-name to initial-cluster-token 2014-10-30 13:43:38 -07:00
Jonathan Boulle
19881b2f15 etcdhttp: return 404 when removing nonexistent member 2014-10-30 09:57:54 -07:00
Brian Waldon
011a67c878 httptypes: add MemberCreateRequest.MarshalJSON 2014-10-29 16:37:07 -07:00
Brian Waldon
2c0f6e4bf9 etcdhttp: s/TestServeAdminMembers*/TestServeMembers*/ 2014-10-29 16:18:03 -07:00
Brian Waldon
f810dda9b2 Merge pull request #1481 from bcwaldon/no-more-admin-api
Remove "admin" from /v2/admin/members
2014-10-29 15:43:37 -07:00
Brian Waldon
de0cf2fb8e Merge pull request #1459 from bcwaldon/member-list
etcdhttp: encode MembersCollection properly
2014-10-29 14:49:22 -07:00
Jonathan Boulle
4b1431109e Merge pull request #1490 from jonboulle/1490
Logging member ID as int
2014-10-29 14:42:02 -07:00
Jonathan Boulle
e99da41539 etcdserver: log member ID as hex string 2014-10-29 14:36:05 -07:00
Jonathan Boulle
5bba81f5fc Merge pull request #1472 from jonboulle/clone_event
waitIndex is not working
2014-10-29 14:23:32 -07:00
Jonathan Boulle
9546df9a6c etcdserver: make peer URLs log message more readable 2014-10-29 14:18:51 -07:00