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
Yicheng Qin
f8b8bdeb17
etcdserver: use path.Join for member key in cluster
2014-10-23 13:27:54 -07:00
Yicheng Qin
3d243baacd
etcdserver: generate id when new cluster
2014-10-23 13:27:54 -07:00
Yicheng Qin
67412e07f8
etcdserver: MemberFromName -> MemberByName
2014-10-23 13:27:54 -07:00
Yicheng Qin
89572b5fd7
etcdserver: refactor cluster and clusterStore
...
Integrate clusterStore into cluster, and let cluster become the source of
cluster info.
2014-10-23 13:27:54 -07:00
Brandon Philips
ab90369f9e
etcdserver: use hex for cluster and machine id
...
Continue using hex everywhere. Including here.
TODO: cleanup the printing of the structs which currently have decimal
to/from:
`{Type:MsgAppResp To:9973738105406047488 From:17050684879817348455 T...`
2014-10-22 16:24:50 -07:00
Barak Michener
e42d65da12
etcdserver: Check the initial cluster settings after checking if the WAL exists
2014-10-22 18:16:43 -04:00
Barak Michener
13656eb4e7
Merge pull request #1340 from barakmich/better_ids2
...
etcdserver: Calculate IDs based on PeerURLs and --initial-cluster-name
2014-10-22 14:49:49 -04:00
Yicheng Qin
89b032cd69
etcdserver: Member.storeKey -> memberStoreKey
2014-10-22 11:09:36 -07:00
Yicheng Qin
7498234e40
etcdserver: record removed member to check incoming message
2014-10-22 11:09:35 -07:00
Barak Michener
502a3c2460
Refactor Cluster to hold and add members.
2014-10-22 13:52:42 -04:00
Barak Michener
1ca7c031ff
first round of comments
...
Conflicts:
etcdserver/config.go
etcdserver/config_test.go
etcdserver/server.go
main.go
2014-10-22 13:49:54 -04:00
Barak Michener
456d1ebcae
etcdserver: Calculate IDs for nodes solely on PeerURLs
...
Removes the notion of name being anything more than advisory or
command-line grouping, and adds checks for bootstrapping the command
line. IDs are consistent if the URLs are consistent.
2014-10-22 13:49:54 -04:00
Yicheng Qin
e2b6a4fc4c
etcdserver: const XXXDir -> StoreXXXPrefix
...
and code clean
2014-10-21 16:10:49 -07:00
Yicheng Qin
2ff3cac653
etcdserver/etcdhttp: store location adjustment
...
Detailed adjustment:
/_etcd/machines/* -> /0/members/*
/* -> /1/*
And it keeps key path returned to user the same as before.
2014-10-21 16:10:19 -07:00
Xiang Li
894e678ad6
etcdserver: checking clusterID
2014-10-21 11:05:24 -07:00
Xiang Li
a44849deec
Merge pull request #1286 from coreos/clusterid
...
*: generate clusterid
2014-10-20 19:07:03 -07:00
Xiang Li
0fd28169c8
etcdserver: use id,cid
2014-10-20 16:35:41 -07:00
Xiang Li
dc68dc9ebd
etcdserver: add a todo for clusterid generation
2014-10-20 16:26:31 -07:00
Yicheng Qin
92230cee63
Merge pull request #1333 from unihorn/172
...
etcdserver/raft: remove msgDenied, removedNodes, shouldStop
2014-10-20 16:04:09 -07:00
Yicheng Qin
e200d2a8e2
etcdserver/raft: remove msgDenied, removedNodes, shouldStop
...
The future plan is to do all these in etcdserver level.
2014-10-20 15:13:18 -07:00
Xiang Li
ea6bcacfe4
*: generate clusterid
2014-10-20 15:00:54 -07:00