Barak Michener
1f84991b3a
Merge pull request #1355 from barakmich/cluster_after_wal
...
etcdserver: Check the initial cluster settings after checking if the WAL...
2014-10-22 18:31:28 -04:00
Barak Michener
e42d65da12
etcdserver: Check the initial cluster settings after checking if the WAL exists
2014-10-22 18:16:43 -04:00
Xiang Li
5444a366da
main: use our own flagset in setupCluster
2014-10-22 14:51:51 -07:00
Xiang Li
ca4f12182a
main: fix default case
2014-10-22 13:49:52 -07:00
Barak Michener
cb5a638c44
style comments
2014-10-22 13:52:42 -04:00
Barak Michener
52dedab7b4
Move setupCluster inside startEtcd
2014-10-22 13:52:42 -04:00
Barak Michener
502a3c2460
Refactor Cluster to hold and add members.
2014-10-22 13:52:42 -04:00
Barak Michener
ad0b7b7dbb
Add cluster name to etcd flags
2014-10-22 13:52:42 -04:00
Barak Michener
1ca7c031ff
first round of comments
...
Conflicts:
etcdserver/config.go
etcdserver/config_test.go
etcdserver/server.go
main.go
2014-10-22 13:49:54 -04:00
Barak Michener
456d1ebcae
etcdserver: Calculate IDs for nodes solely on PeerURLs
...
Removes the notion of name being anything more than advisory or
command-line grouping, and adds checks for bootstrapping the command
line. IDs are consistent if the URLs are consistent.
2014-10-22 13:49:54 -04:00
Jonathan Boulle
341c7190d3
test: add govet to tests
2014-10-21 11:32:38 -07:00
Jonathan Boulle
63b328ed11
main: exit 0 on -h/--help
2014-10-20 15:32:58 -07:00
Yicheng Qin
dcaa7f0a37
Merge pull request #1328 from unihorn/169
...
skip initial-cluster check when reboot
2014-10-20 13:06:24 -07:00
Jonathan Boulle
7a4d42166b
*: add license header to all source files
2014-10-17 15:41:22 -07:00
Yicheng Qin
aa176610f3
main: remove duplicated self name check
2014-10-17 15:37:30 -07:00
Jonathan Boulle
bc7d372d5c
main: correct peer-addr reference
2014-10-16 20:06:26 -07:00
Xiang Li
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
Xiang Li
828accf07b
etcdserver: better logging
2014-10-15 13:07:34 +08:00
Jonathan Boulle
a6dfde85e4
main: fix typos and initial-cluster references
2014-10-13 14:52:49 -07:00
Xiang Li
8bbbaa88b2
*: raft related int64 -> uint64
2014-10-09 14:29:21 +08:00
Brandon Philips
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
Jonathan Boulle
5098cb0d32
main: fix temporary discovery cluster
2014-10-06 16:10:29 -07:00
Brandon Philips
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
Brandon Philips
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
Jonathan Boulle
ec7bcbb50d
main: fail on peers/peers-file flags
2014-10-06 14:25:11 -07:00
Xiang Li
9e3d045b2b
*:discovery hook up
2014-10-06 10:12:42 -07:00
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