Commit Graph

150 Commits

Author SHA1 Message Date
67e57ffca4 etcdserver: split out client and server listeners 2014-09-16 11:36:37 -07:00
e04c028d64 etcdserver/etcdhttp: switch to using http.ServeMux 2014-09-15 16:05:20 -07:00
8a5ab2ec06 etcdserver: introduce Server interface
This changes etcdserver.Server to an interface, with the former Server
(now "EtcdServer") becoming the canonical/production implementation.
This will facilitate better testing of the http server et al with mock
implementations of the interface.
It also more clearly defines the boundary for users of the Server.
2014-09-15 15:11:01 -07:00
38c074cb05 Merge pull request #1067 from unihorn/122
raft: write entry 0 into log
2014-09-15 10:00:49 -07:00
140fd6d6c4 raft: restart using last written entry also 2014-09-15 09:56:33 -07:00
e7ea6a374a main: check node id is not noneid 2014-09-14 23:28:11 -07:00
2030ca202f wal: change wal filename format
Make raftIndex section to be expected raftIndex of next entry.

It makes filename more intuitive and straight-forward.

The commit also adds comments for filename format.
2014-09-12 11:24:28 -07:00
884c702512 wal: wal.OpenFromIndex -> wal.OpenAtIndex
The first entry read from the wal should be the index provided. This
name makes that more clear.
2014-09-11 12:52:06 -07:00
7415d53020 proxy: add proxy-mode functionality to etcd daemon 2014-09-10 18:06:56 -07:00
a3334eed23 main: break out startEtcd func 2014-09-10 18:04:02 -07:00
c251304068 *: s/Id/ID/
golang convention dictates that the individual characters in an
abbreviation should all have the same case. Use ID instead of Id.

The protobuf generator still generates code that does not meet
this convention, but that's a fight for another day.
2014-09-10 16:09:08 -07:00
d519491545 http: add TODO for peers var 2014-09-09 15:55:42 -07:00
0c1d1b7aeb etcdhttp: add /v2/machines endpoint 2014-09-09 15:00:29 -07:00
5c8839387d etcdhttp: set peer should clean up previous values 2014-09-08 16:38:01 -07:00
9215ebb6aa Merge pull request #992 from coreos/wal
wal
2014-09-08 16:24:28 -07:00
4a02a1a60c main: clarify fatal message for unexpect nodeid 2014-09-08 16:21:27 -07:00
9a57d1067d main: make default data to have _data_etcd suffix 2014-09-08 16:15:18 -07:00
54734b0903 main/wal: add a const for 0700 magic number 2014-09-08 15:45:58 -07:00
a3b6a646eb main: check the id read by from wal. 2014-09-08 15:31:11 -07:00
36730ca613 main: use -> using 2014-09-08 10:32:49 -07:00
8c9d7e3e93 main: add a helper function for starting raft 2014-09-05 10:24:13 -07:00
0851a1fe7f main: better error msg 2014-09-05 10:02:46 -07:00
ee78890f22 main: use data-dir as the path to data directory flag 2014-09-05 09:56:25 -07:00
1a6e908971 *: add wal 2014-09-05 09:52:40 -07:00
bca8f9e0ed etcdserver: change default id to 0x1 2014-09-04 22:26:42 -07:00
c1e7a788cd etcdserver: add default peer 2014-09-04 10:11:32 -07:00
2ba57ee75d *: remove unused pkgs 2014-09-03 09:20:20 -07:00
cf91035a36 main: log hex of id 2014-09-03 09:20:20 -07:00
576e26ea39 oops 2014-09-03 09:20:20 -07:00
dcd64f2a59 ... 2014-09-03 09:20:19 -07:00
728690fa03 hanging 2014-09-03 09:20:19 -07:00
8f3544ece8 server of one is alive! 2014-09-03 09:20:19 -07:00
cb7b321240 boom 2014-09-03 09:20:19 -07:00
22c8ec0a80 ... 2014-09-03 09:20:18 -07:00
f6a9599eb4 *: rename etcd to etcdserver 2014-09-03 09:20:10 -07:00
0881021e54 all config -> cfg 2014-09-03 09:20:07 -07:00
a5eec89113 cfg/ -> conf/ 2014-09-03 09:20:07 -07:00
41ccf13393 config -> cfg
It is extremely confusing to use variables named the same as a package.
Please no longer do this.
2014-09-03 09:20:07 -07:00
18c4be469f move ./http to main 2014-09-03 09:20:07 -07:00
4f10917ce9 etcd: add a read/write timeout to server
The default is for connections to last forever[1]. This leads to fds
leaking. I set the timeout so high by default so that watches don't have
to keep retrying but perhaps we should set it slower.

Tested on a cluster with lots of clients and it seems to have relieved
the problem.

[1] https://groups.google.com/forum/#!msg/golang-nuts/JFhGwh1q9xU/heh4J8pul3QJ

Original Commit: 084dcb5596
From: philips <brandon@ifup.org>
2014-09-03 09:20:02 -07:00
061fad12a9 main: do not pass id to etcd 2014-09-03 09:19:57 -07:00
44836d9099 etcd: move server/usage.go to etcd/v2_usage.go 2014-09-03 09:19:49 -07:00
18d95b336f main: generate 64bit id 2014-09-03 09:05:14 -07:00
c4e7432ef9 etcd: support cors 2014-09-03 09:05:14 -07:00
45c6bf80e1 etcd: support etcd server tls 2014-09-03 09:05:14 -07:00
4181f1b2e1 etcd: support raft tls 2014-09-03 09:05:14 -07:00
c3f8eabac3 etcd: separate raft and client port 2014-09-03 09:05:13 -07:00
77233b26d0 etcd: support old flags 2014-09-03 09:05:13 -07:00
fc35324ba7 etcd: pass v2 kv api tests 2014-09-03 09:05:13 -07:00
1b59eacb72 refactor(main): rename etcd.go to main.go 2014-04-01 12:54:38 -07:00