Jonathan Boulle
41757e7f78
etcdserver: collapse shared readWAL logic
2014-11-08 17:07:05 -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
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
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
Jonathan Boulle
285cd404e3
etcdserver: print peerURLs when adding member
2014-11-07 12:00:41 -08:00
Jonathan Boulle
5055863e09
etcdserver: add docstrings for confchanges
2014-11-07 10:19:55 -08:00
Xiang Li
bf47fe7cac
Merge pull request #1647 from xiangli-cmu/force_cluster
...
etcdserver: force new cluster
2014-11-07 10:15:53 -08:00
Yicheng Qin
9d19429993
Merge pull request #1609 from yichengq/202
...
etcdserver: refactor sender
2014-11-07 10:12:02 -08:00
Xiang Li
0a9c6164af
etcdserver: add support for force cluster
2014-11-07 08:49:01 -08:00
Jonathan Boulle
8f1885a398
discovery: add command line flag for discovery-proxy
2014-11-06 16:35:24 -08:00
Xiang Li
c5e6053fcd
Merge pull request #1638 from xiangli-cmu/better_logging
...
etcdserver: better logging for clusterFromPeerURLs
2014-11-06 14:33:53 -08:00
Xiang Li
eb0d80767e
etcdserver: better logging for clusterFromPeerURLs
2014-11-06 14:28:07 -08:00
Yicheng Qin
457b30e585
etcdserver: add/remove sender in sendhub explicitly
2014-11-06 14:04:14 -08:00
Yicheng Qin
1e05cd75c7
etcdserver: refactor sender
...
1. restrict the number of inflight connections to remote member
2. support stop
2014-11-06 14:04:14 -08:00
Jonathan Boulle
04f6208ace
etcdmain: use StringsFlag for initialclusterstate
2014-11-06 11:13:24 -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
99b1af40c6
etcdserver: move config validation to cluster
2014-11-05 17:55:07 -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
Yicheng Qin
866ec5948c
etcdhttp/etcdserver: support HEAD on /v2/keys/ namespace
2014-11-04 00:06:49 -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
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
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
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
3dfb6723b2
*: rename initial-cluster-name to initial-cluster-token
2014-10-30 13:43:38 -07:00
Brian Waldon
480e92d340
strutil: move IDAsHex/IDFromHex to new pkg
2014-10-27 18:39:09 -07:00
Brian Waldon
2472953939
etcdhttp: hex-encode member ID
2014-10-27 17:25:22 -07:00
Brian Waldon
80172c3d4a
etcdserver: s/parseMemberID/mustParseMemberIDFromKey/
2014-10-27 17:25:00 -07:00
Yicheng Qin
ee27846d5b
Merge pull request #1422 from unihorn/187
...
etcdserver: parse context error for better message
2014-10-27 11:00:01 -07:00
Yicheng Qin
e77f8e311c
etcdserver: parse context error for better message
2014-10-27 10:59:15 -07:00
Xiang Li
009b737cef
*: better logging
2014-10-26 08:13:03 -07:00
Jonathan Boulle
719c57a29d
proxy: retrieve ClientURLs from cluster
...
This is a simple solution to having the proxy keep up to date with the
state of the cluster. Basically, it uses the cluster configuration
provided at start up (i.e. with `-initial-cluster-state`) to determine
where to reach peer(s) in the cluster, and then it will periodically hit
the `/members` endpoint of those peer(s) (using the same mechanism that
`-cluster-state=existing` does to initialise) to update the set of valid
client URLs to proxy to.
This does not address discovery (#1376 ), and it would probably be better
to update the set of proxyURLs dynamically whenever we fetch the new
state of the cluster; but it needs a bit more thinking to have this done
in a clean way with the proxy interface.
Example in Procfile works again.
2014-10-24 15:54:12 -07:00
Yicheng Qin
49a68adcf1
Merge pull request #1386 from unihorn/184
...
etcdserver: update member attribute when apply request
2014-10-24 12:46:11 -07:00
Yicheng Qin
ea0bff80c0
etcdserver: update member attribute when apply request
2014-10-24 12:43:53 -07:00
Yicheng Qin
08593bcdf6
etcdserver: support newly-join member bootstrap
2014-10-24 12:38:44 -07:00
Yicheng Qin
4d80f01201
etcdserver: Cluster.IsIDremoved -> Cluster.IsIDRemoved
2014-10-23 14:29:58 -07:00
Yicheng Qin
8eee8c260e
etcdserver: rebase on master and code clean
2014-10-23 13:58:55 -07:00