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
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
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
Barak Michener
ad0b7b7dbb
Add cluster name to etcd flags
2014-10-22 13:52:42 -04: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
Xiang Li
a44849deec
Merge pull request #1286 from coreos/clusterid
...
*: generate clusterid
2014-10-20 19:07:03 -07:00
Jonathan Boulle
b3d5333cb3
*: fix various formatting issues
2014-10-20 17:55:18 -07:00
Xiang Li
ea6bcacfe4
*: generate clusterid
2014-10-20 15:00:54 -07:00
Jonathan Boulle
7a4d42166b
*: add license header to all source files
2014-10-17 15:41:22 -07:00
Jonathan Boulle
e0801360d3
godep: update clockwork dependency
2014-10-17 10:05:29 -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
Yicheng Qin
8609acf573
etcdhttp: set stats field in peer handler
2014-10-16 14:23:09 -07:00
Jonathan Boulle
9b9e72e2a3
etcdhttp: add tests for ServeStats/ServeLeader
2014-10-16 10:43:49 -07:00
Jonathan Boulle
97ae531eda
etcdserver: split out storestats and serverstats
2014-10-16 10:43:49 -07:00
Jonathan Boulle
fedb67a71a
etcdserver: fix TODO and change to base 16
2014-10-16 10:43:49 -07:00
Jonathan Boulle
8168fed825
etcdserver: add ServerStats and LeaderStats
...
This adds the remaining two stats endpoints: `/v2/stats/self`, for
various statistics on the EtcdServer, and `/v2/stats/leader`, for
statistics on a leader's followers.
By and large most of the stats code is copied across from 0.4.x, updated
where necessary to integrate with the new decoupling of raft from
transport.
This does not satisfactorily resolve the question of name vs ID. In the
old world, names were unique in the cluster and transmitted over the
wire, so they could be used safely in all statistics. In the new world,
a given EtcdServer only knows its own name, and it is instead IDs that
are communicated among the cluster members. Hence in most places here we
simply substitute a string-encoded ID in place of name, and only where
possible do we retain the actual given name of the EtcdServer.
2014-10-16 10:43:44 -07:00
Jonathan Boulle
0a8721a708
etcdserver: expose store statistics
2014-10-16 10:43:23 -07:00
Yicheng Qin
a8a1d4fd93
Merge pull request #1299 from unihorn/162
...
etcdhttp: add PUT and DELETE on /v2/admin/members/
2014-10-15 10:52:11 -07:00
Yicheng Qin
6d0658c8ca
etcdhttp: check error returned by ParseForm
2014-10-14 14:50:11 -07:00
Jonathan Boulle
7656069675
etcdhttp: remove members handling for now
2014-10-14 12:07:28 -07:00
Yicheng Qin
99e35554c0
etcdhttp: add doc for member management http endpoint
2014-10-14 11:09:14 -07:00
Jonathan Boulle
4183b69e12
*: move from third_party to Godep
2014-10-14 00:37:52 -07:00
Yicheng Qin
31264e7eb5
etcdhttp: add PUT and DELETE on /v2/admin/members/
2014-10-13 22:36:06 -07:00
Xiang Li
57ae19b500
Merge pull request #1290 from coreos/member_endpoint
...
etcdserver: change machines endpoint to members
2014-10-14 11:04:08 +08:00
Xiang Li
1177b07535
etcdserver: change machines endpoint to members
2014-10-14 11:02:17 +08:00
Xiang Li
3516cc3ee5
*: change all ID to uint64
2014-10-12 08:38:48 +08:00
Yicheng Qin
77271b0663
etcdserver: split Member into RaftAttributes and Attributes
...
The split helps to save them in different key paths, because they have
distinct life cycle on update.
2014-10-09 20:28:00 -07:00
Xiang Li
8bbbaa88b2
*: raft related int64 -> uint64
2014-10-09 14:29:21 +08:00
Yicheng Qin
8e8719f6ac
etcdserver: Create, Delete -> Add, Remove
2014-10-07 16:21:58 -07:00
Yicheng Qin
d051af4d3d
etcdserver: apply config change on cluster store
2014-10-07 11:04:50 -07:00
Jonathan Boulle
f432b9d29b
etcdhttp: remove configurable timeout
...
It's slightly unclear why we expose this timeout as being configurable,
and the `-timeout` flag does not exist in 0.4.x, so for now, remove the
flag until we have evidence that it is needed.
2014-10-03 13:47:34 -07:00
Jonathan Boulle
af6b29f291
main: move server configuration to etcdserver package
2014-10-03 13:34:49 -07:00