Jonathan Boulle
f1ed69e883
*: switch to line comments for copyright
...
Build tags are not compatible with block comments.
Also adds copyright header to a few places it was missing.
2015-01-26 09:53:30 -08:00
Yicheng Qin
4dd00be365
etcdhttp: reset serve and watch timeout
2015-01-02 16:39:13 -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
9aefb91531
etcdhttp: always respond json-format error to client
2014-11-03 22:19:17 -08:00
Jonathan Boulle
9726d3909c
etcdhttp: bump default Server timeout to 5 mins
2014-10-31 10:52:46 -07:00
Brian Waldon
8fbf887e52
etcdhttp: only log when error deserves it
2014-10-28 10:30:05 -07:00
Xiang Li
6cb45236ac
etcdhttp: make admin HTTP endpoint return json format error
2014-10-27 17:03:58 -07:00
Xiang Li
d0604c7d5c
error: write->writeTo
2014-10-27 15:32:36 -07:00
Brian Waldon
b06499d0c2
etcdserver/etcdhttp: break apart HTTP handlers
2014-10-26 13:20:53 -07:00
Brian Waldon
435611cf0d
etcdserver/etcdhttp: break apart http.go
2014-10-25 11:28:52 -07:00
Yicheng Qin
338f59db74
Merge pull request #1401 from unihorn/186
...
etcdhttp: parse quorum field from http request
2014-10-24 15:54:40 -07:00
Yicheng Qin
0e1d1646fd
etcdhttp: parse quorum field from http request
2014-10-24 15:44:39 -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
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
ed29259801
etcdserver: fix member endpoint on peerurl
2014-10-23 17:18:01 -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
8eee8c260e
etcdserver: rebase on master and code clean
2014-10-23 13:58:55 -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
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
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
Yicheng Qin
5014558b00
etcdserver: clean code
2014-10-22 11:09:36 -07:00
Yicheng Qin
3162ead7b1
etcdhttp: do message statistics only on valid ones
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
Yicheng Qin
06b196e345
etcdhttp: writeEvent -> writeKeyEvent
2014-10-21 16:10:49 -07:00
Yicheng Qin
ca73f25615
etcdhttp: parseRequest -> parseKeyRequest
2014-10-21 16:10:49 -07: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
Jonathan Boulle
b3d5333cb3
*: fix various formatting issues
2014-10-20 17:55:18 -07:00
Jonathan Boulle
7a4d42166b
*: add license header to all source files
2014-10-17 15:41:22 -07:00
Jonathan Boulle
ec18e46641
etcdserver/etcdhttp: switch to using fake clock
2014-10-17 10:05:29 -07:00
Jonathan Boulle
c28907ba95
etcdserver: fix race and improve stats interfaces
2014-10-16 23:05:48 -07:00
Jonathan Boulle
c30b82b596
etcdserver: fix data race in retrieving self stats
2014-10-16 23:05:48 -07:00