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
cb59a46576
Merge pull request #1396 from unihorn/185
...
etcdhttp: trim StoreKeysPrefix from error in serveKeys
2014-10-24 14:48:31 -07:00
Jonathan Boulle
46528ee17b
Merge pull request #1391 from jonboulle/version
...
/version is 404 now
2014-10-24 14:48:02 -07:00
Jonathan Boulle
9a465b9cf5
etcdhttp: add /version endpoint
2014-10-24 14:47:37 -07:00
Jonathan Boulle
bac13b5cb2
etcdserver/etcdhttp: remove log message for every received raft
2014-10-24 14:25:20 -07:00
Yicheng Qin
34dcbb4679
etcdhttp: trim StoreKeysPrefix from error in serveKeys
...
It returns error messaage like this now:
'{"errorCode":100,"message":"Key not found","cause":"/1/pants","index":10}'
The commit trims '/1' prefix from cause field if exists.
This is a hack to make it display well. It is correct because all error causes
that contain Path puts Path at the head of the string.
2014-10-24 14:12:53 -07:00
Jonathan Boulle
d7f9228133
Merge pull request #1381 from jonboulle/members
...
/v2/admin/members API should use JSON containers in response
2014-10-24 13:20:10 -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
d1b57b448d
Merge pull request #1383 from unihorn/183
...
etcdserver: support newly-join member bootstrap
2014-10-24 12:43:25 -07:00
Yicheng Qin
08593bcdf6
etcdserver: support newly-join member bootstrap
2014-10-24 12:38:44 -07:00
Jonathan Boulle
543e12074a
etcdserver/member: change JSON fields to lowerCamelCase
2014-10-24 12:03:17 -07:00
Jonathan Boulle
14852662ef
etcdhttp: rename Members -> members in JSON, update doc
2014-10-24 12:03:17 -07:00
Jonathan Boulle
7ef468b315
etcdhttp: remove /v2/admin/members/x serving
2014-10-24 12:03:17 -07:00
Jonathan Boulle
9b679de9dd
etcdserver/etcdhttp: use container for admin/members endpoint
2014-10-24 12:03:17 -07:00
Xiang Li
e081ad7298
Merge pull request #1368 from xiangli-cmu/doc
...
doc: add admin api doc
2014-10-24 10:42:14 -07:00
Jonathan Boulle
0276089ed9
etcdserver: fix + expand config tests
2014-10-24 10:09:42 -07:00
Jonathan Boulle
b9514ea265
etcdserver: add test for cluster.String
2014-10-24 10:03:28 -07:00
Xiang Li
ed29259801
etcdserver: fix member endpoint on peerurl
2014-10-23 17:18:01 -07:00
Jonathan Boulle
d7301a5cf4
main: fix proxy initialization and setupCluster
2014-10-23 16:09:29 -07:00
Xiang Li
d8258c38be
Merge pull request #1374 from xiangli-cmu/cluster_on_peerurl
...
etcdserver: add member endpoint to peerurl
2014-10-23 16:08:45 -07:00
Jonathan Boulle
af42f4a56b
etcdserver: sort Members() in Cluster
2014-10-23 15:57:27 -07:00
Xiang Li
02551c277d
etcdserver: add member endpoint to peerurl
2014-10-23 15:55:00 -07:00
Yicheng Qin
4d80f01201
etcdserver: Cluster.IsIDremoved -> Cluster.IsIDRemoved
2014-10-23 14:29:58 -07:00
Xiang Li
c25c50582e
doc: add admin api doc
2014-10-23 14:26:33 -07:00
Yicheng Qin
d47de988e4
etcdserver: panic when >1 members have the given name in MemberByName
2014-10-23 14:24:07 -07:00
Yicheng Qin
8eee8c260e
etcdserver: rebase on master and code clean
2014-10-23 13:58:55 -07:00
Yicheng Qin
e21de51768
etcdserver: remove NewClusterFromMemberInfos
2014-10-23 13:27: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
d2c4e981ed
etcdserver: Member.Pick -> Member.PickPeerURL
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
Xiang Li
86facb3f91
etcdhttp: sort member
2014-10-23 11:21:20 -07:00
Xiang Li
8d6bb4a471
etcdserver: support GET on admin endpoint
2014-10-23 10:53:55 -07:00
Xiang Li
051ad7585f
Merge pull request #1363 from coreos/return_json
...
etcdserver: admin PUT returns the json representation of the newly creat...
2014-10-22 20:11:08 -07:00
Brandon Philips
2cb8efb9b5
Merge pull request #1362 from philips/consistent-hex-use
...
etcdserver: use hex for cluster and machine id
2014-10-22 18:43:21 -07:00
Xiang Li
63fa2a626a
etcdserver: admin PUT returns the json representation of the newly created member
2014-10-22 17:19:28 -07:00
Xiang Li
712a05be83
Merge pull request #1357 from coreos/accept_json
...
etcdserver: admin endpoint accepts json body
2014-10-22 16:30:22 -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
Xiang Li
7be0f4b618
etcdserver: admin endpoint accepts json body
2014-10-22 16:19:48 -07:00
Brandon Philips
0d0bc3a57e
etcdserver: fixup mismatch error line
...
Both wcid and gcid are strings, don't try to print it out in hex.
2014-10-22 15:48:22 -07:00
Brandon Philips
2c21ae0f16
Merge pull request #1358 from philips/etcdserver-cleanup-cluster-id-msg
...
etcdserver: cleanup the cluster ID error message
2014-10-22 15:42:30 -07:00
Barak Michener
1f84991b3a
Merge pull request #1355 from barakmich/cluster_after_wal
...
etcdserver: Check the initial cluster settings after checking if the WAL...
2014-10-22 18:31:28 -04:00
Brandon Philips
400dd2d7bc
etcdserver: cleanup the cluster ID error message
...
1) Don't panic since we know exactly where this is coming from and don't
need the user to see a full back trace
2) Add docs explaining this situation a bit further
3) Cleanup the error to look like other similiar errors
2014-10-22 15:26:35 -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
Xiang Li
6d9eb57555
etcdhttp: test bad url for POST on admin endopint
2014-10-22 14:27:08 -07:00
Xiang Li
d00152765a
etcdserver: etcdserver generates the ID when adding new member.
...
When adding new member, the etcdserver generates the ID based on the current time
and the given peerurls. We include time to add the uniqueness, since the node with
same peerurls should be able to (add, then remove) several times.
2014-10-22 13:15:56 -07: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
Barak Michener
829cec8ccf
Merge stylistic comments
2014-10-22 14:26:05 -04:00