Commit Graph

94 Commits (0589afe60549879a97b72d9f78446858d89eda75)

Author SHA1 Message Date
Barak Michener a88a53274f security: Lazily create the security directories. Fixes #2755, may find new instances for #2741
revert the kv integration test

fix nits

amend security mention of GUEST
2015-05-18 17:28:04 -04:00
Yicheng Qin a6a649f1c3 etcdserver: stop exposing Cluster struct
After this PR, only cluster's interface Cluster is exposed, which makes
code much cleaner. And it avoids external packages to rely on cluster
struct in the future.
2015-05-13 10:01:25 -07:00
Yicheng Qin 032db5e396 *: extract types.Cluster from etcdserver.Cluster
The PR extracts types.Cluster from etcdserver.Cluster. types.Cluster
is used for flag parsing and etcdserver config.

There is no need to expose etcdserver.Cluster public, which contains
lots of etcdserver internal details and methods. This is the first step
for it.
2015-05-12 14:53:11 -07:00
Xiang Li e866314b94 etcdserver: support update cluster version through raft
1. Persist the cluster version change through raft. When the member is restarted, it can recover
the previous known decided cluster version.

2. When there is a new leader, it is forced to do a version checking immediately. This helps to
update the first cluster version fast.
2015-05-12 11:44:34 -07:00
Xiang Li 077c8397d2 integration: add a test case for a full cluster rotation 2015-04-27 15:38:06 -07:00
Xiang Li a42b9708ae integration: add tests around the membership change issues 2015-04-24 13:07:43 -07:00
Yicheng Qin ebecee34e0 Merge pull request #2701 from yichengq/rafthttp-anon
rafthttp: add remotes
2015-04-24 13:04:37 -07:00
Barak Michener fa74e702d8 security: Improve the security api as per the suggestions list in #2384
Subcommits:

decouple root and security enable/disable

create root role

prefix matching

godep: bump go-etcd to include credentials

add godep for speakeasy and auth entry parsing

appropriate errors for security enable/disable

WIP adding to etcd/client all the security client methods

add guest access

minor ui return tweaks

revert client changes

respond to comments, log more security operations

fix major ensure() bug, add better UX

block recursive access

fix some boneheaded mistakes

fix integration test

last comments

fix up security_api.md

philips nits

fix docs
2015-04-23 16:11:38 -04:00
Yicheng Qin 1811701427 Revert "etcdserver: fix cluster fallback recovery"
This reverts commit cff005777a.

Conflicts:
	etcdserver/server.go
2015-04-19 11:34:33 -07:00
Yicheng Qin 73936d1874 integration: add TestDoubleTLSCluster 2015-04-02 10:08:40 -07:00
Yicheng Qin ccb0934e22 integration: add TestTLSClusterUsingDiscovery 2015-04-02 00:01:39 -07:00
Yicheng Qin d2efa2a615 integration: add TestTLSClusterOf3 2015-04-01 20:55:00 -07:00
Yicheng Qin f3baf4517b integration: fix upgrade test
Upgrade test listens on a fixed port, which may fail with 'bind address
already in use' if the port was just used to send tcp sockets.

The commit makes it listen on a random available port to avoid this.
2015-03-31 16:17:58 -07:00
Yicheng Qin 87e3de8b8b integration: fix decrease cluster tests 2015-02-28 11:35:16 -08:00
Yicheng Qin 1c5a507761 rafthttp: refactor peer and add general stream 2015-02-28 11:35:16 -08:00
Yicheng Qin 2c94e2d771 *: make dial timeout configurable
Dial timeout is set shorter because
1. etcd is supposed to work in good environment, and the new value is long
enough
2. shorter dial timeout makes dial fail faster, which is good for
performance
2015-02-28 11:18:59 -08:00
Brian Waldon cd85451971 client: clarify relationship of AfterIndex and waitIndex 2015-02-28 10:45:20 -08:00
Brian Waldon 1c03df62a5 client: WaitIndex -> AfterIndex 2015-02-28 10:38:46 -08:00
Brian Waldon 7255fb1b62 client: alias etcdserver/etcdhttp/httptypes.Member 2015-02-28 10:22:52 -08:00
Brian Waldon 3fdda06602 client: s/SyncableHTTPClient/Client/g 2015-02-28 10:22:51 -08:00
Brian Waldon 3b41b77cd7 client: ClientConfig -> Config 2015-02-28 10:22:51 -08:00
Brian Waldon 74fe28c5e0 client: exchange ClientConfig for SyncableHTTPClient 2015-02-28 10:22:50 -08:00
Brian Waldon 3d53e9bfaa client: pass around options as pointers 2015-02-28 10:22:50 -08:00
Brian Waldon 01fc01ec69 client: KeysAPI.[R]Watch -> Watcher w/ opts struct 2015-02-28 10:19:04 -08:00
Brian Waldon c6d955f4c1 client: drive Create with setAction; drop TTL 2015-02-28 10:12:35 -08:00
Yicheng Qin cff005777a etcdserver: fix cluster fallback recovery
Cluster and transport may recover to old states when new node joins
the cluster. Record cluster last modified index to avoid this.
2015-02-20 14:30:00 -08:00
Barak Michener 92dca0af0f *: remove shadowing of variables from etcd and add travis test
We've been bitten by this enough times that I wrote a tool so that
it never happens again.
2015-02-17 16:31:42 -05:00
Xiang Li 163ea3f5c5 integration: wait for slow travis 2015-02-13 11:41:03 -08:00
Xiang Li aed2c82e44 integration: fix test 2015-02-13 10:02:42 -08:00
Xiang Li fbc4c8efb5 etcdserver: fix snapshot 2015-02-13 09:54:25 -08:00
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
Xiang Li 973f79e1c9 etcdserver: separate out raft related stuff 2015-01-15 15:15:13 -08:00
Xiang Li 1a6161d08a Merge pull request #2104 from xiang90/timeout
etcdserver: make heartbeat/election configurable
2015-01-15 13:52:20 -08:00
Yicheng Qin d380be8fa1 integration: fix TestForceNewCluster to wait leader 2015-01-15 13:27:24 -08:00
Xiang Li 276a4abac0 etcdserver: make heartbeat/election configurable 2015-01-15 11:11:33 -08:00
Yicheng Qin 68fdd70580 integration: fix TestForceNewCluster 2015-01-15 10:42:57 -08:00
Xiang Li 8e8552b2ad integration: fix force cluster test 2015-01-14 16:40:09 -08:00
Xiang Li 1b9ccfc66f Merge pull request #2084 from yichengq/294
integration: add TestForceNewCluster
2015-01-13 15:47:21 -08:00
Yicheng Qin a318112c7a integration: add TestForceNewCluster 2015-01-13 13:55:38 -08:00
Yicheng Qin dc6aef0d02 etcdhttp: add NewPeerHandler test 2015-01-12 15:56:29 -08:00
Yicheng Qin 9132098960 integration: wait longer for member to be removed 2015-01-07 13:36:59 -08:00
Yicheng Qin 930156c18a integration: adjust election ticks using env var 2015-01-07 11:18:29 -08:00
Yicheng Qin 66d9f28926 Merge pull request #2027 from yichengq/273
integration: extend timeout to wait
2015-01-05 08:33:35 -08:00
Yicheng Qin b44d7f84c4 integration: extend timeout to wait 2015-01-02 16:28:27 -08:00
Xiang Li 152676f43a *: support removing the leader from a 2 members cluster 2014-12-29 11:34:33 -08:00
Yicheng Qin 6d046d94d6 integration: improve member tests 2014-12-04 17:37:44 -08:00
Xiang Li 88e2fab572 Merge pull request #1859 from xiang90/pause_test
*: add pauseMember test
2014-12-04 15:11:59 -08:00
Yicheng Qin ca32a5fe9b Merge pull request #1860 from yichengq/249
integration: fix possible early fire in TestWatch
2014-12-04 14:48:39 -08:00
Yicheng Qin 356146b5a0 integration: fix possible early fire in TestWatch 2014-12-04 14:34:20 -08:00
Xiang Li 151f043414 *: add pauseMember test 2014-12-04 14:22:43 -08:00