Commit Graph

118 Commits

Author SHA1 Message Date
dcaa7f0a37 Merge pull request #1328 from unihorn/169
skip initial-cluster check when reboot
2014-10-20 13:06:24 -07:00
7a4d42166b *: add license header to all source files 2014-10-17 15:41:22 -07:00
aa176610f3 main: remove duplicated self name check 2014-10-17 15:37:30 -07:00
bc7d372d5c main: correct peer-addr reference 2014-10-16 20:06:26 -07:00
efba919a93 main: use node name as default dir
We use nodeID as the default dir previously. It works fine before we do dynamic nodeID
generation (introducing time). After the change the dynamic nodeID will change every
time we restart the etcd process. If the user does not provide the data dir, the default
dir will change every time. It is not the desired behavior.

In this commit, we change the default data dir to node name. If the user changes the node
name and does provide the data dir, etcd still cannot recover from previous state. But it
is much better than using nodeID. And it is actually a doucmentation issue.

Conflicts:
	main.go
2014-10-16 21:22:12 +08:00
828accf07b etcdserver: better logging 2014-10-15 13:07:34 +08:00
a6dfde85e4 main: fix typos and initial-cluster references 2014-10-13 14:52:49 -07:00
8bbbaa88b2 *: raft related int64 -> uint64 2014-10-09 14:29:21 +08:00
6cbc282be1 main: use a new cluster by default
This is a safe default for now. Use it to make `./etcd` work again.
2014-10-06 17:34:14 -07:00
5098cb0d32 main: fix temporary discovery cluster 2014-10-06 16:10:29 -07:00
3500b56e54 Merge pull request #1237 from philips/0.5-docs
use initial-cluster and initial-cluster-state flags
2014-10-06 15:04:04 -07:00
e2d8037ded main: use initial-cluster and initial-cluster-state flags
In preperation for adding the ability to join a machine to an existing
cluster force the user to specify whether they expect this to me a new
cluster or an active one.

The error for not specifying the initial-cluster-state is:
```
etcd: initial cluster state unset and no wal found
```
2014-10-06 14:59:25 -07:00
ec7bcbb50d main: fail on peers/peers-file flags 2014-10-06 14:25:11 -07:00
9e3d045b2b *:discovery hook up 2014-10-06 10:12:42 -07:00
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
e5f5fcff48 etcdserver: collapse dir configuration to DataDir 2014-10-03 13:34:49 -07:00
af6b29f291 main: move server configuration to etcdserver package 2014-10-03 13:34:49 -07:00
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
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
073eb7677d etcdserver: move grep member logic into publish func 2014-10-01 11:50:47 -07:00
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
cbc84bc70e etcdserver: minimize input info 2014-10-01 11:47:17 -07:00
a40a270e19 etcdserver: publish self info when start 2014-10-01 11:47:17 -07:00
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
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
e38fbfe9de Merge pull request #1196 from philips/add-flagtypes-package
flagtypes: introduce flagtypes package
2014-09-28 19:48:12 -07:00
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
5784693a39 etcdserver: Cluster.Endpoints() -> Cluster.PeerURLs() 2014-09-28 14:39:47 -07:00
04f6993108 main: undeprecate peers-file for now 2014-09-26 09:54:47 -07:00
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
8a60257bff main: remove cors wrapper for raft handler 2014-09-25 11:58:11 -07:00
720aa6aeae pkg: move cors.go to /pkg/cors.go 2014-09-25 11:46:08 -07:00
a0f5625728 pkg: move /transport to pkg/transport 2014-09-25 10:47:14 -07:00
c82309d2b4 main: add version flag 2014-09-24 17:08:42 -07:00
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
48e8ea1569 etcd: sort list of deprecated flags 2014-09-24 16:49:11 -07:00
a6b7f4e5ea etcd: deprecate remaining v0.4.6 flags 2014-09-24 16:44:32 -07:00
e30c1eeefd pkg: move SetFlagsFromEnv to pkg package 2014-09-24 16:29:47 -07:00
f7c353a703 etcd: export SetFlagsFromEnv 2014-09-24 16:12:06 -07:00
18c300f80c etcd: pass flagset into setFlagsFromEnv 2014-09-24 16:11:47 -07:00
314c13a8f0 pkg: move DeprecatedFlag to new package 2014-09-24 16:09:37 -07:00
002ace2403 etcd: remove unnecessary flag desc 2014-09-24 16:03:53 -07:00
69fba03fc1 etcd: correctly override flag.Usage 2014-09-24 15:39:06 -07:00
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
784d7ac680 etcd: warn on deprecated flags 2014-09-24 12:14:11 -07:00
1ea3197feb proxy: pass addrs and scheme into newDirector 2014-09-23 11:01:55 -07:00
b94d0281d4 etcd: use TLS in proxy transport 2014-09-23 10:19:01 -07:00
27813599a1 etcd: wire up peer TLS flags 2014-09-23 10:03:17 -07:00
342ea18239 transport: build TLS config in NewTransport 2014-09-23 10:03:17 -07:00
0c7351c309 etcd: manually construct HTTP client for peer communication 2014-09-23 10:03:14 -07:00