Commit Graph

105 Commits (d8a53ca7167e7f16dff4b38d4f6ce969819ef225)

Author SHA1 Message Date
Xiang Li 5b4a473f14 Merge pull request #667 from unihorn/53
chore(tests): test TestTLSMultiNodeKillAllAndRecovery now
2014-03-27 22:40:09 -04:00
Yicheng Qin 4e747d24dd chore(tests): test TestTLSMultiNodeKillAllAndRecovery now
It is fixed.
2014-03-27 17:06:18 -07:00
Tomás Senart b6053d6a86 Making code formatting consistent.
$ gofmt -s -w  && goimports -w
2014-03-27 14:19:08 +01:00
Blake Mizerany 4bce3e4810 test(tests/functional): skip TestTLSMultiNodeKillAllAndRecovery until fixed 2014-03-26 19:22:59 -07:00
Ben Johnson 62b89a128a Merge branch 'master' of https://github.com/coreos/etcd into proxy
Conflicts:
	config/config.go
	server/peer_server.go
	server/transporter.go
	tests/server_utils.go
2014-03-24 15:30:14 -07:00
Ben Johnson 174b9ff343 bump(github.com/goraft/raft): 6bf34b9
Move from coreos/raft to goraft/raft and update to latest.
2014-03-24 15:09:47 -07:00
Ben Johnson 7d4fda550d Machine join/remove v2 API. 2014-03-18 16:25:21 -06:00
Yicheng Qin 15126a680f Merge pull request #621 from unihorn/34
chore(fixtures/ca): make all certificates generated by etcd-ca
2014-03-17 13:47:59 -07:00
Yicheng Qin 50d9e6a7fd chore(fixtures/ca): make all certificates generated by etcd-ca 2014-03-17 12:32:55 -07:00
Xiang Li 3ae792b159 refactor(listener) refactor listener related code
Remove duplicate code around creating http listener.
Start to listen incoming http requests just before serving them.
2014-03-13 15:47:27 -07:00
Ben Johnson c0a59b3a27 Add minimum active size and promote delay. 2014-03-10 14:44:04 -06:00
Ben Johnson 3fff1a8dcd Add /machines and /machines/:name endpoints. 2014-03-06 15:11:31 -07:00
Ben Johnson c8d6b26dfd Add auto-demotion after peer inactivity. 2014-03-03 11:15:05 -07:00
Yicheng Qin 69adb78433 fix(transporter): CancelRequest doesn't work on HTTPS connections blocked
Currently this is a workaround. And it should be fixed in Go1.3.
2014-02-27 14:31:46 -08:00
Yicheng Qin e99bc99dcc fix(tests/multi_node_kill_all_and_recovery): wait for cluter to build over 2014-02-27 14:31:46 -08:00
Ben Johnson fddbf35df2 Add automatic node promotion / demotion. 2014-02-25 10:02:01 -07:00
Ben Johnson f5698d3566 Proxy promotion. 2014-02-24 17:01:04 -07:00
Ben Johnson 1d961b8e56 Add proxy mode. 2014-02-22 15:02:20 -07:00
Yicheng Qin 46d817f91b Merge pull request #577 from unihorn/6
chore: rename 'heartbeat timeout' to 'heartbeat interval'
2014-02-18 17:11:31 -08:00
Yicheng Qin f434177a9a chore: rename 'heartbeat timeout' to 'heartbeat interval'
Heartbeat timeout means the period length that indicates heartbeat is
out of service, which is different from heartbeat interval.

So we should use '-peer-heartbeat-interval' instead of
'-peer-heartbeat-timeout' in etcd.

'-peer-heartbeat-timeout' is deprecated but still could be used.
2014-02-18 16:37:20 -08:00
Yicheng Qin 04f21b5976 Merge pull request #569 from unihorn/5
Ordering and functionality of `-discovery` `-peers` and data dir to find peers
2014-02-17 14:34:53 -08:00
Yicheng Qin 3a4df1612c feat(discovery): adjust boot order to find peers
The boot order for peers is -discovery, -peers, log data, forming
new cluster itself.

Special rules:
1. If discovery succeeds, it would find peers specified by discover URL
only.
2. Etcd would fail when meeting bad -discovery, no -peers and log data.

Add TestDiscoveryDownNoBackupPeersWithDataDir as the test.
2014-02-17 12:53:39 -08:00
Yicheng Qin bd56b15b6e fix(tests/discovery): use host as -peers parameter instead of url
Or it cannot test the functionality correctly.
Moreover, add TestDiscoveryNoWithBackupPeers as the test for it.
2014-02-14 18:23:41 -08:00
Brandon Philips a72f913a60 fix(tests/functional): some squashing mistakes in PR merge
accidental squash mistake in the last PR that was merged caused a
function to be renamed but not it's caller.
2014-02-14 18:17:30 -08:00
Yicheng Qin efdc741e5c feat(tests/util): wait until server is up when creating cluster
Wait until server is up instead of for some time
2014-02-14 18:06:43 -08:00
Yicheng Qin e69118ade7 chore(tests/multi_node_kill_one): check function-call result
To stop test in time if error occurs
2014-02-14 17:36:11 -08:00
Yicheng Qin 7ad2dadabf chore(test): remove useless node1.etcd dir
It is a directory checked in from an etcd test run in mistake.
2014-02-13 08:52:16 -08:00
Brandon Philips 76da437f29 bump(github.com/coreos/raft): ef3280ce54f60fff98a72012f547ed2b3415841f 2014-02-07 11:19:23 -08:00
Brandon Philips 21d7d14178 chore(tests/discovery): remove errant debug statement 2014-02-06 22:10:10 -08:00
Brandon Philips 14f15c33fe fix(tests/server_utils): use a WaitGroup for RunServer
Make sure that all of the servers exit before we return by using a
WaitGroup in each handler. This was used to help track down the issue
with the TestDiscoverySecondPeerUp test and the hung go-etcd watcher.
2014-02-06 22:10:10 -08:00
Brandon Philips bfbc539321 hack(tests/discovery): don't use go-etcd for watch
go-etcd has a bug in the watcher that holds open a goroutine. Avoid
goetcd for this operation until it is fixed.
2014-02-06 22:10:10 -08:00
Brandon Philips 5f124166eb feat(tests/discovery): use low retry interval
In TestDiscoverySecondPeerFirstNoResponse use a low retryinterval so the
test doesn't take forever.
2014-02-06 22:10:10 -08:00
Brandon Philips da3fe920cb fix(tests/v1_migration): add a -name flag
The info flag is ignored as of 1c91c167fc
so in order for this test to work we need to add `-name` flag.
2014-02-06 21:23:00 -08:00
Brian Waldon 63fa35c99f refactor(tls): clarify & simplify tls configuration 2014-02-06 21:15:38 -08:00
Brandon Philips cbdf4a738c fix(discovery): use prevExist instead of prevValue=init
Use PUT /_state?prevExist=true in the protocol instead of PUT
/_state?prevValue=init. This lets people point one vanilla etcd at the
key prefix of another vanilla etcd and have it just work.
2014-02-05 15:14:57 -08:00
Brandon Philips 2822b9c579 tests(tests/functional): add tests for Discovery
This tests a variety of failure cases for the Discovery service
including:

- Initial leader failures
- Discovery service failures
- Positive tests for discovery working flawlessly
2014-02-05 09:27:39 -08:00
Brandon Philips ff6090836c fix(tests/server_utils): add a metrics bucket
This is required to avoid getting nil pointer exceptions if a peer joins
this test server.
2014-02-05 09:27:39 -08:00
Brandon Philips 72b393ca53 Merge pull request #519 from philips/fixup-server-tls-client-config
fix(server): fix client certificate verification
2014-02-03 17:33:45 -08:00
Brian Waldon 226c20c097 test(TLS): Add test coverage for etcd TLS 2014-02-03 17:32:24 -08:00
Brandon Philips d7d20d1c3d bump(github.com/stretchr/testify): 9cc77fa25329013ce07362c7742952ff887361f2 2014-02-02 16:57:36 -08:00
Brandon Philips 2557992b70 fix(tests): use correct raft package 2014-02-02 16:57:36 -08:00
Brandon Philips 13b6c1e684 chore(*): make everything use goven
for i in github.com/BurntSushi/toml github.com/coreos/go-etcd/etcd github.com/coreos/go-log/log github.com/gorilla/context github.com/rcrowley/go-metrics bitbucket.org/kardianos/osext github.com/coreos/go-systemd/journal github.com/coreos/raft code.google.com/p/goprotobuf/proto ; do goven  -copy -rewrite $i; done
2014-02-01 23:44:18 -08:00
Brandon Philips ea8a353545 chore(*): gofmt everything 2014-02-01 23:44:10 -08:00
Brian Waldon 2fe22f1890 refactor(servers): emit http.Handlers from *Server 2014-01-22 11:17:58 -08:00
Brian Waldon 089021ca6d refacotor(transporter): make TLS config explicit 2014-01-22 11:17:58 -08:00
Brian Waldon f158dfcd77 refactor(peerserver): Remove PeerServerConfig.Path 2014-01-22 11:17:58 -08:00
Brian Waldon a7d9efa900 refactor(server): Remove ServerConfig struct 2014-01-22 11:17:58 -08:00
Brian Waldon 0abd860f7e refactor(server): drop Serve code; rename cors object
* server/cors.go renamed to http/cors.go
* all CORS code removed from Server and PeerServer
* Server and PeerServer fulfill http.Handler, now passed to http.Serve
* non-HTTP code in PeerServer.Serve moved to PeerServer.Start
2014-01-22 11:17:57 -08:00
Brian Waldon a2ee620394 refactor(raft): init raft transporter & server in main 2014-01-22 11:17:56 -08:00
Brian Waldon 7bd4d05a38 refactor(peer-server): move listener init out of peer_server.go 2014-01-22 11:17:41 -08:00