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
e5f5fcff48
etcdserver: collapse dir configuration to DataDir
2014-10-03 13:34:49 -07:00
Jonathan Boulle
af6b29f291
main: move server configuration to etcdserver package
2014-10-03 13:34:49 -07:00
Brandon Philips
83137f9eba
pkg/types: introduce a URLs type
...
Cleanup the usage of URLs into its own type so we don't have to use a
FlagValue everywhere we have a list of URLs.
2014-10-01 14:41:01 -07:00
Brandon Philips
619c7f9fdb
Merge pull request #1220 from bcwaldon/bkcompat
...
Backwards-compatibility with v0.4.6 addr-related flags
2014-10-01 12:53:50 -07:00
Yicheng Qin
073eb7677d
etcdserver: move grep member logic into publish func
2014-10-01 11:50:47 -07:00
Brian Waldon
dd88a08f8e
etcd: support v0.4.6 addr flags
...
The -addr, -bind-addr, -peer-addr, and peer-bind-addr flags are
superseded by -advertise-client-urls, -listen-client-urls,
-advertise-peer-urls, and -listen-peer-urls, respectively.
If any of the former flags are provided, however, they will still
work. If the new counterparts to the old flags are provided, etcd
will log an error and fail.
2014-10-01 11:49:01 -07:00
Yicheng Qin
cbc84bc70e
etcdserver: minimize input info
2014-10-01 11:47:17 -07:00
Yicheng Qin
a40a270e19
etcdserver: publish self info when start
2014-10-01 11:47:17 -07:00
Yicheng Qin
7a698be6a3
main: not use loop variable in goroutine in loop body
...
Because loop variable are reused in following loops.
2014-10-01 11:07:32 -07:00
Brandon Philips
c2f96631d3
etcdserver: stop using addScheme
...
This standardizes the flags to use a list of URLs everywhere. The next
step is to enforce the scheme based on TLS settings and support compat
flags.
2014-09-30 16:40:32 -07:00
Xiang Li
e38fbfe9de
Merge pull request #1196 from philips/add-flagtypes-package
...
flagtypes: introduce flagtypes package
2014-09-28 19:48:12 -07:00
Brandon Philips
78a9bba276
pkg/types/flags: introduce flags package
...
I want to use the Addrs type in another experimental proxy that I am
implementing. Pull it out into a separate package.
2014-09-28 14:56:30 -07:00
Yicheng Qin
5784693a39
etcdserver: Cluster.Endpoints() -> Cluster.PeerURLs()
2014-09-28 14:39:47 -07:00
Jonathan Boulle
04f6993108
main: undeprecate peers-file for now
2014-09-26 09:54:47 -07:00
Brandon Philips
5e3fd6ee3f
etcdserver: introduce the cluster and member
...
This introduces two new concepts: the cluster and the member.
Members are logical etcd instances that have a name, raft ID, and a list
of peer and client addresses.
A cluster is made up of a list of members.
2014-09-25 18:04:10 -07:00
Xiang Li
8a60257bff
main: remove cors wrapper for raft handler
2014-09-25 11:58:11 -07:00
Xiang Li
720aa6aeae
pkg: move cors.go to /pkg/cors.go
2014-09-25 11:46:08 -07:00
Xiang Li
a0f5625728
pkg: move /transport to pkg/transport
2014-09-25 10:47:14 -07:00
Jonathan Boulle
c82309d2b4
main: add version flag
2014-09-24 17:08:42 -07:00
Brian Waldon
f603d90775
Merge pull request #1167 from bcwaldon/move-flag-code
...
Move flag-related code into new pkg package
2014-09-24 16:57:48 -07:00
Brian Waldon
48e8ea1569
etcd: sort list of deprecated flags
2014-09-24 16:49:11 -07:00
Brian Waldon
a6b7f4e5ea
etcd: deprecate remaining v0.4.6 flags
2014-09-24 16:44:32 -07:00
Brian Waldon
e30c1eeefd
pkg: move SetFlagsFromEnv to pkg package
2014-09-24 16:29:47 -07:00
Brian Waldon
f7c353a703
etcd: export SetFlagsFromEnv
2014-09-24 16:12:06 -07:00
Brian Waldon
18c300f80c
etcd: pass flagset into setFlagsFromEnv
2014-09-24 16:11:47 -07:00
Brian Waldon
314c13a8f0
pkg: move DeprecatedFlag to new package
2014-09-24 16:09:37 -07:00
Brian Waldon
002ace2403
etcd: remove unnecessary flag desc
2014-09-24 16:03:53 -07:00
Brian Waldon
69fba03fc1
etcd: correctly override flag.Usage
2014-09-24 15:39:06 -07:00
Brian Waldon
bcedef83d3
etcd: override flag usage func
...
No need to communicate deprecated flags, so prevent them from getting
printed in the usage info.
2014-09-24 13:52:58 -07:00
Brian Waldon
784d7ac680
etcd: warn on deprecated flags
2014-09-24 12:14:11 -07:00
Brian Waldon
1ea3197feb
proxy: pass addrs and scheme into newDirector
2014-09-23 11:01:55 -07:00
Brian Waldon
b94d0281d4
etcd: use TLS in proxy transport
2014-09-23 10:19:01 -07:00
Brian Waldon
27813599a1
etcd: wire up peer TLS flags
2014-09-23 10:03:17 -07:00
Brian Waldon
342ea18239
transport: build TLS config in NewTransport
2014-09-23 10:03:17 -07:00
Brian Waldon
0c7351c309
etcd: manually construct HTTP client for peer communication
2014-09-23 10:03:14 -07:00
Brian Waldon
5470a6d3d6
etcdserver: pass http client into Sender
2014-09-23 10:02:23 -07:00
Brian Waldon
f2d3d90b60
etcd: wire up client TLS flags
2014-09-22 17:58:31 -07:00
Brian Waldon
17459c7bfc
transport: wrap net.Listener with TLSInfo
2014-09-22 17:58:30 -07:00
Brian Waldon
a782a1a7d1
etcd: manually construct listeners
2014-09-22 17:57:44 -07:00
Jonathan Boulle
1a36b53f14
main: add CORS support
2014-09-19 14:58:35 -07:00
Jonathan Boulle
f0789e7349
main: add address validation for bind-addr flag
2014-09-18 16:38:14 -07:00
Brian Waldon
6e782b0e63
etcd: add -proxy=readonly
2014-09-18 15:05:33 -07:00
Brian Waldon
afce2948d2
etcd: replace -proxy-mode with -proxy
2014-09-18 14:30:22 -07:00
Jonathan Boulle
1c544667ff
Merge pull request #1040 from jonboulle/1040_config_env_vars
...
etcd needs to be configurable through env vars
2014-09-17 15:28:02 -07:00
Jonathan Boulle
b66a40495d
raft: introduce Node interface
2014-09-17 14:18:56 -07:00
Jonathan Boulle
844897360c
main: add test for setting flags
2014-09-17 14:12:04 -07:00
Xiang Li
ab61a8aa9a
*: init for on disk snap support
2014-09-17 13:56:12 -07:00
Jonathan Boulle
40c19e525c
main: retrieve config from env vars
2014-09-17 12:15:39 -07:00
Xiang Li
f17391a72b
Merge pull request #1090 from jonboulle/1090_multiple_sockets
...
listen on multiple sockets
2014-09-16 15:29:05 -07:00
Yicheng Qin
f786de13d0
Merge pull request #1081 from unihorn/125
...
make TTL work
2014-09-16 15:14:44 -07:00
Jonathan Boulle
936ecd097a
main: listen for client requests on multiple sockets
2014-09-16 14:46:51 -07:00
Jonathan Boulle
6d4c79b157
main: switch back to default ports
2014-09-16 14:36:59 -07:00
Yicheng Qin
023dc7cba2
etcdserver: add SYNC request
2014-09-16 13:42:03 -07:00
Jonathan Boulle
67e57ffca4
etcdserver: split out client and server listeners
2014-09-16 11:36:37 -07:00
Jonathan Boulle
e04c028d64
etcdserver/etcdhttp: switch to using http.ServeMux
2014-09-15 16:05:20 -07:00
Jonathan Boulle
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
Yicheng Qin
38c074cb05
Merge pull request #1067 from unihorn/122
...
raft: write entry 0 into log
2014-09-15 10:00:49 -07:00
Yicheng Qin
140fd6d6c4
raft: restart using last written entry also
2014-09-15 09:56:33 -07:00
Xiang Li
e7ea6a374a
main: check node id is not noneid
2014-09-14 23:28:11 -07:00
Yicheng Qin
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
Brandon Philips
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
Brian Waldon
7415d53020
proxy: add proxy-mode functionality to etcd daemon
2014-09-10 18:06:56 -07:00
Brian Waldon
a3334eed23
main: break out startEtcd func
2014-09-10 18:04:02 -07:00
Brian Waldon
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
Yicheng Qin
d519491545
http: add TODO for peers var
2014-09-09 15:55:42 -07:00
Yicheng Qin
0c1d1b7aeb
etcdhttp: add /v2/machines endpoint
2014-09-09 15:00:29 -07:00
Xiang Li
5c8839387d
etcdhttp: set peer should clean up previous values
2014-09-08 16:38:01 -07:00
Xiang Li
9215ebb6aa
Merge pull request #992 from coreos/wal
...
wal
2014-09-08 16:24:28 -07:00
Xiang Li
4a02a1a60c
main: clarify fatal message for unexpect nodeid
2014-09-08 16:21:27 -07:00
Xiang Li
9a57d1067d
main: make default data to have _data_etcd suffix
2014-09-08 16:15:18 -07:00
Xiang Li
54734b0903
main/wal: add a const for 0700 magic number
2014-09-08 15:45:58 -07:00
Xiang Li
a3b6a646eb
main: check the id read by from wal.
2014-09-08 15:31:11 -07:00
Xiang Li
36730ca613
main: use -> using
2014-09-08 10:32:49 -07:00
Xiang Li
8c9d7e3e93
main: add a helper function for starting raft
2014-09-05 10:24:13 -07:00
Xiang Li
0851a1fe7f
main: better error msg
2014-09-05 10:02:46 -07:00
Xiang Li
ee78890f22
main: use data-dir as the path to data directory flag
2014-09-05 09:56:25 -07:00
Xiang Li
1a6e908971
*: add wal
2014-09-05 09:52:40 -07:00
Xiang Li
bca8f9e0ed
etcdserver: change default id to 0x1
2014-09-04 22:26:42 -07:00
Xiang Li
c1e7a788cd
etcdserver: add default peer
2014-09-04 10:11:32 -07:00
Xiang Li
2ba57ee75d
*: remove unused pkgs
2014-09-03 09:20:20 -07:00
Blake Mizerany
cf91035a36
main: log hex of id
2014-09-03 09:20:20 -07:00
Blake Mizerany
576e26ea39
oops
2014-09-03 09:20:20 -07:00
Blake Mizerany
dcd64f2a59
...
2014-09-03 09:20:19 -07:00
Blake Mizerany
728690fa03
hanging
2014-09-03 09:20:19 -07:00
Blake Mizerany
8f3544ece8
server of one is alive!
2014-09-03 09:20:19 -07:00
Blake Mizerany
cb7b321240
boom
2014-09-03 09:20:19 -07:00
Blake Mizerany
22c8ec0a80
...
2014-09-03 09:20:18 -07:00
Xiang Li
f6a9599eb4
*: rename etcd to etcdserver
2014-09-03 09:20:10 -07:00
Blake Mizerany
0881021e54
all config -> cfg
2014-09-03 09:20:07 -07:00
Blake Mizerany
a5eec89113
cfg/ -> conf/
2014-09-03 09:20:07 -07:00
Blake Mizerany
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
Blake Mizerany
18c4be469f
move ./http to main
2014-09-03 09:20:07 -07:00
Yicheng Qin
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
Xiang Li
061fad12a9
main: do not pass id to etcd
2014-09-03 09:19:57 -07:00
Xiang Li
44836d9099
etcd: move server/usage.go to etcd/v2_usage.go
2014-09-03 09:19:49 -07:00
Xiang Li
18d95b336f
main: generate 64bit id
2014-09-03 09:05:14 -07:00
Xiang Li
c4e7432ef9
etcd: support cors
2014-09-03 09:05:14 -07:00
Xiang Li
45c6bf80e1
etcd: support etcd server tls
2014-09-03 09:05:14 -07:00
Xiang Li
4181f1b2e1
etcd: support raft tls
2014-09-03 09:05:14 -07:00