Commit Graph

211 Commits (f6c7d5c46a2a4470545d73f7833e57821b124714)

Author SHA1 Message Date
Fabian Reinartz 8bf795dc3c etcdmain/osutil: shutdown gracefully, interrupt handling
The functionality in pkg/osutil ensures that all interrupt handlers finish
and the process kills itself with the proper signal.
Test for interrupt handling added.
The server shutsdown gracefully by stopping on interrupt (Issue #2277.)
2015-02-13 10:28:53 +01:00
Barak Michener fade9b6065 etcdserver: Refactor 2.0.1 directory rename into a proper migration
fix all instances

fix detection test
2015-02-12 11:53:19 -05:00
Yicheng Qin 92b329fdb9 etcdmain: use symlink instead of link for v0.4 files
link doesn't support directory.
2015-02-03 10:59:43 -08:00
Yicheng Qin afb14a3e7a Merge pull request #2210 from yichengq/316
etcdmain: use /member subdir to save member data
2015-02-02 17:06:30 -08:00
Yicheng Qin ce1d7a9fa9 etcdmain: use /member subdir to save member data 2015-02-02 17:01:19 -08:00
Xiang Li fbabcedcc9 etcd: fix proxy
1. move proxy datadir to /proxy subdir.
2. delay update proxy's cluster after validation.
2015-02-02 14:58:45 -08:00
Xiang Li ae9f54c132 etcd: fix proxy updating 2015-01-30 16:56:41 -08:00
Xiang Li dc7374c488 etcd: persist proxy cluster to disk 2015-01-30 15:18:26 -08:00
Xiang Li 9c7f66c5d9 Merge pull request #2119 from sorah/peer-ca-on-fetching-members
etcdserver: User peerTLSInfo to get cluster member
2015-01-26 10:50:44 -08:00
Shota Fukumori (sora_h) 033e7d1db9 etcdserver: User peerTLSInfo to get cluster member 2015-01-27 03:43:21 +09:00
Jonathan Boulle f1ed69e883 *: switch to line comments for copyright
Build tags are not compatible with block comments.
Also adds copyright header to a few places it was missing.
2015-01-26 09:53:30 -08:00
Xiang Li 276a4abac0 etcdserver: make heartbeat/election configurable 2015-01-15 11:11:33 -08:00
Yicheng Qin dc6aef0d02 etcdhttp: add NewPeerHandler test 2015-01-12 15:56:29 -08:00
Xiang Li a15f39e6a2 etcdmain: do not set timeout for client api 2015-01-06 16:17:56 -08:00
Xiang Li 7f1c630a0b *: use keepalive listener to detect dead clients 2015-01-06 12:09:34 -08:00
Xiang Li 0afbca4090 etcdmain: add readtimeout for http server 2015-01-06 11:04:38 -08:00
Xiang Li 08e9c25ea5 *: move srv into pkg discovery 2014-12-24 21:37:20 -08:00
Xiang Li 0fa754d90e etcdmain: add config.go 2014-12-19 18:33:19 -08:00
Barak Michener 4f2d35679e Merge pull request #1947 from barakmich/dns_bootstrap
add capability to bootstrap from DNS SRV
2014-12-19 13:45:03 -08:00
Barak Michener 8fc17147ef change logging 2014-12-19 16:40:29 -05:00
Barak Michener 6295dfba5a resolve all hostnames in DNS discovery 2014-12-18 19:19:21 -05:00
Barak Michener 977c74069c move constants out for windows 2014-12-18 18:57:11 -05:00
Barak Michener 2dfcf053d4 rename flag to discovery-srv 2014-12-18 18:13:40 -05:00
Barak Michener 7f733ad68b Fully resolve DNS entries to IPs and ignore single errors (such as no etcd-server-ssl) 2014-12-18 18:08:56 -05:00
Barak Michener fc70aa27d2 add apurl checking and logging 2014-12-17 20:53:12 -05:00
Barak Michener 04d9f848a7 fix from comments 2014-12-17 20:28:48 -05:00
Barak Michener fdad6630ea Add a simple test and mock for genDNS 2014-12-17 20:18:41 -05:00
Barak Michener af4272848d add capability to bootstrap from DNS 2014-12-15 19:26:42 -05:00
Xiang Li ec777ebd28 Merge pull request #1918 from xiang90/http_no_logging
etcdmain: discard the http server logging
2014-12-11 16:06:58 -08:00
Xiang Li 3a83ab1b71 etcdmain: discard the http server logging 2014-12-11 16:06:28 -08:00
Xiang Li d9b21c79d4 etcdmain: better logging for discovery error 2014-12-11 16:03:27 -08:00
Xiang Li 0416503124 Merge pull request #1803 from junxu/master
etcdmain: Fix misuse "-addr" flag
2014-12-11 09:45:17 -08:00
Xiang Li a1f648e5db etcdmain: format usage 2014-12-04 17:21:23 -08:00
Xiang Li d3db010190 *: support purging old wal/snap files 2014-12-01 11:50:17 -08:00
junxu 43d6f9f964 Update etcd.go
etcdmain: Fix misuse "-addr" flag

In code, it uses "-advertise-client-urls" or "-addr" flags to get the list of this member's peer URLs, 
It should be using "-peer-addr" flag instead of "-addr" flag.
2014-11-27 10:38:47 +08:00
Yicheng Qin 3e55834c38 *: set read/write timeout for raft transport and listener 2014-11-24 13:46:44 -08:00
Xiang Li 8bf71d796e *: gracefully stop etcdserver 2014-11-14 14:12:24 -08:00
Xiang Li 92096dfdc3 *: print out configuration when necessary 2014-11-13 10:46:42 -08:00
Jonathan Boulle 1197c1f965 etcdserver: move peer URLs check to config 2014-11-12 13:12:49 -08:00
Jonathan Boulle 3f358b6d5d etcdserver: ensure initial-advertise-peer-urls match initial-cluster
This adds a check to setupCluster to ensure that the list of URLs
specified in `initial-advertise-peer-urls` matches those configured in
`initial-cluster` for this node. Also updates the documentation to
clarify this and address some changes in wording.
2014-11-12 12:54:35 -08:00
Xiang Li b6f0c789b8 transport: create a tls listener only if the tlsInfo is not empty and the scheme is HTTPS 2014-11-11 11:51:57 -08:00
Jonathan Boulle e1e454f138 etcdmain: do not exit inappropriately 2014-11-10 12:34:14 -08:00
Jonathan Boulle 8799679083 etcdmain: actually return errors 2014-11-10 11:59:59 -08:00
Jonathan Boulle a607e097c6 etcdserver: re-order ServerConfig fields 2014-11-07 11:45:59 -08:00
Xiang Li 0a9c6164af etcdserver: add support for force cluster 2014-11-07 08:49:01 -08:00
Jonathan Boulle 376268391b Merge pull request #1646 from jonboulle/1536_disco_proxy
discovery: add command line flag for discovery-proxy
2014-11-07 08:32:23 -08:00
Jonathan Boulle 8f1885a398 discovery: add command line flag for discovery-proxy 2014-11-06 16:35:24 -08:00
Jonathan Boulle 321d65c4ac pkg: fix SetFlagsFromEnv behaviour
This function was fundamentally buggy, as a panic could be trivially
triggered by setting the wrong environment variable (e.g.
ETCD_BIND_ADDR=foo). Instead, let's propagate the error and present it
to the user in a cleaner way.
2014-11-06 14:39:30 -08:00
Jonathan Boulle 04f6208ace etcdmain: use StringsFlag for initialclusterstate 2014-11-06 11:13:24 -08:00
Jonathan Boulle 68bca981de discovery: simplify interface
There's no real need to expose a Discoverer interface/struct when the
only use of the interface (and indeed the module) is to invoke a single
function. This isn't Java, after all. So instead, simplify to Discovery
exposing just two functions: JoinCluster (i.e. what was formerly called
"discovery"), and GetCluster (hitherto "ProxyDiscovery")
2014-11-05 22:45:01 -08:00
Jonathan Boulle b85496922f etcdmain: simplify proxy start logic 2014-11-05 11:41:03 -08:00
Jonathan Boulle 5de9d38cc6 pkg: move to more generic StringsFlag 2014-11-04 16:52:56 -08:00
Xiang Li 71acd0c3d0 discovery: consolidate proxyDiscover and Discover interface 2014-11-04 16:38:05 -08:00
Xiang Li 5cb13fd071 *: support discovery fallback 2014-11-04 14:30:22 -08:00
Yicheng Qin e4b12a8e28 Merge pull request #1593 from unihorn/200
etcdserver: print out initial cluster members
2014-11-03 22:23:40 -08:00
Yicheng Qin 5ed5d44652 etcdserver: print out initial cluster members
It is moved from etcdmain pkg because the line should only be printed out
when etcd bootstraps at the first time.
2014-11-03 19:34:24 -08:00
Xiang Li 075ab6415f Merge pull request #1587 from xiangli-cmu/fix_wal
wal: sync before returning from create
2014-11-03 15:58:47 -08:00
Xiang Li dd09042632 etcdserver: try to listen on ports before initializing etcd server 2014-11-03 15:55:58 -08:00
Kelsey Hightower 3ec4da6ac6 etcd: print initial cluster members during startup
etcd now prints the initial clusters members during startup.

```
2014/11/03 10:32:46 etcd: initial cluster members: etcd0=http://127.0.0.1:2380,etcd1=http://127.0.0.1:2390,etcd2=http://127.0.0.1:2400
```
2014-11-03 10:38:18 -08:00
Xiang Li 3dfb6723b2 *: rename initial-cluster-name to initial-cluster-token 2014-10-30 13:43:38 -07:00
Jonathan Boulle cf9dd31daa etcd: move main logic to etcdmain subpackage 2014-10-29 18:43:22 -07:00