Commit Graph

203 Commits (9e43e726a9274654faca77da2b1b160b49a08e86)

Author SHA1 Message Date
Brandon Philips 9e43e726a9 Merge pull request #507 from philips/turn-snapshots-on-by-default
feat(*): enable snapshots by default
2014-02-05 09:08:43 -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
Brandon Philips d7d20d1c3d bump(github.com/stretchr/testify): 9cc77fa25329013ce07362c7742952ff887361f2 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
Brandon Philips 0566bf2d5d Revert "Fix compile bug in peer_server_handlers.go "
This reverts commit e1ed380f04.
2014-02-01 20:09:53 -08:00
Brandon Philips 58e1f12240 doc(server): some basic docs on the tls_config object
This should be refactored but something to remember while refactoring.
2014-01-31 17:08:37 -08:00
Brandon Philips 0fa6d38574 fix(server): fix client certificate verification
In d0c4916fe9 the TLS CA Certificate
verification broke.

This was bisected using the following basic test:

```
./bin/etcd -f -name machine0 -data-dir machine0 -ca-file=/tmp/ca/ca.crt -cert-file=/tmp/ca/server.crt -key-file=/tmp/ca/server.key.insecure
```

And in another window doing

```
curl --key /tmp/ca/server2.key.insecure  --cert /tmp/ca/server2.crt -k -L https://127.0.0.1:4001/v2/keys/foo -XPUT -d value=bar -v
```

Before merging this PR there are a few things that need to be fixed up:

1) Tests for client certs both positive and negative
2) Refactor (or at least documentation of) the TLSConfig types
2014-01-31 16:56:15 -08:00
augustoroman e1ed380f04 Fix compile bug in peer_server_handlers.go
resp.Success is a func() bool, not a bool.  Call it.
2014-01-30 15:31:36 -08:00
Brandon Philips 9a0ddb3760 feat(server): log on snapshot success or failure
lila.local: snapshot of 12 events completed at index 479
lila.local: snapshot of 12 events at index 491 attempted and failed: handling snapshot
2014-01-24 07:13:01 -08:00
Brandon Philips 7ee7e910eb feat(*): enable snapshots by default
Ben recently added test coverage for snapshots so we should enable it in
etcd. Lets do this.

1d66f6a111
2014-01-23 20:53:22 -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 19980a7033 refactor(peerserver): remove timeouts from PeerServerConfig 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 5c3a3db2d8 refactor(server): treat Server as an http.Handler 2014-01-22 11:17:57 -08:00
Brian Waldon 074099a1b2 refactor(cors): Simplify corsInfo struct 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 ffa2b07dc4 refactor(transporter): Pass in everything the transporter needs 2014-01-22 11:17:43 -08:00
Brian Waldon 60bbc57aeb refactor(transporter): pass in timeouts 2014-01-22 11:17:43 -08:00
Brian Waldon 86718167e8 refactor(peer_server): move stats construction to factories 2014-01-22 11:17:42 -08:00
Brian Waldon 7bd4d05a38 refactor(peer-server): move listener init out of peer_server.go 2014-01-22 11:17:41 -08:00
Brian Waldon d0c4916fe9 refactor(server): move listener init out of server.go 2014-01-22 11:17:26 -08:00
Brian Waldon 91fc6aabd2 chore(gofmt): Run gofmt 2014-01-22 11:17:26 -08:00
Brian Waldon c0ff8f6026 chore(imports): Shift around some imports 2014-01-22 11:17:26 -08:00
Brian Waldon a93d60be90 refactor(cors): Break apart CORS data and middleware 2014-01-22 11:17:26 -08:00
Brian Waldon c47760382e refactor(Server): Use a config struct in Server 2014-01-22 11:17:25 -08:00
Brian Waldon 9c8a23c333 refactor(PeerServer): Use a config struct in PeerServer 2014-01-22 11:17:03 -08:00
Brian Waldon 91f768f9ae refactor(cors): Rename cors_handler.go to cors.go 2014-01-22 10:59:12 -08:00
Brian Waldon 97bc5b260d feat(metrics): Publish peer heartbeat events as metrics 2014-01-21 11:44:22 -08:00
Brian Waldon 7eaad5c8e0 feat(metrics): enable some metrics; push to graphite
* -trace flag controls whether or not to enable metrics-gathering
  and the /debug/* HTTP endpoints
* -graphite-host flag controls where metrics should be sent
* timer.ae.handle metric tracks execution time of AppendEntriesRequest
2014-01-20 15:39:36 -08:00
Brandon Philips 7a7f6aea00 Merge pull request #479 from philips/add-debug-endpoint
add-debug-endpoint
2014-01-16 11:28:52 -08:00
Brandon Philips c2077ed0b6 feat(server): add net/http/pprof endpoints
Add some basic profiling endpoints over http to start digging into
memory and request latencies.
2014-01-15 15:03:29 -08:00
Xiang Li d9088a5f18 Merge pull request #473 from bcwaldon/fix-peer-timeouts
Use election and heartbeat timeouts when building peer transporter
2014-01-15 02:11:40 -08:00
Brandon Philips e2e0853492 fix(server/release_version): checkin to git 2014-01-14 22:14:47 -08:00
Brian Waldon 48e36422b5 chore(gofmt): Run gofmt on server/config.go 2014-01-14 09:18:09 -08:00
Brian Waldon 32df6f92fc fix(peer): Pass peer server timeouts through factory
The peer's heartbeat and election timeouts are needed to build
the transporter in the factory method.
2014-01-14 09:18:03 -08:00
Brian Waldon ae2130952b fix(config): Set VeryVerbose properly 2014-01-10 11:45:04 -08:00
Brian Waldon b0cdf73565 feat(logging): Add VeryVeryVerbose opt to control raft trace info
Set very_very_verbose=true in a config file or use the -vvv CLI
option to get raft trace logs in addition to etcd debug logs.
2014-01-10 11:45:04 -08:00
Ben Johnson c64c739fab Merge pull request #461 from xiangli-cmu/stream_watcher
feat(stream watchers) add stream watcher support
2014-01-10 08:42:31 -08:00
Cenk Alti 5b924dfd4e feat(stream watchers) disable double chunking 2014-01-10 15:09:35 +02:00
Xiang Li f250649a5e fix(snapshot) count num of log entries rather than etcd transcations 2014-01-09 21:28:09 +08:00
Cenk Alti c247d807af feat(stream watchers) end streaming if too many notifications 2014-01-09 14:15:36 +02:00
Xiang Li 22a25a18b3 feat(stream watchers) add stream watcher support 2014-01-09 15:28:33 +08:00
Xiang Li 6b77b94127 Merge pull request #420 from benbjohnson/logging
Logging
2014-01-08 21:36:52 -08:00
Xiang Li 2bfb8f5e4f Merge pull request #418 from xiangli-cmu/cancel_watcher
cancel watcher
2014-01-08 21:34:32 -08:00
Xiang Li fa3b4a7941 refactor(watcher) change newWatcher to Watch 2014-01-09 13:29:04 +08:00
Ben Johnson 53477af1eb Merge branch 'master' of https://github.com/coreos/etcd into logging 2014-01-08 16:50:51 -07:00