4596 Commits

Author SHA1 Message Date
Xiang Li
8a8af60fad etcdctl: backup tool should use the new layout 2015-04-22 15:09:15 -07:00
xiaost
7de19fefe8 etcdserver: fix minor bug in EtcdServer.send
it seems to nothing serious.
after deleted peers, the log may output:
"etcdserver: send message to unknown receiver %s"
2015-04-22 15:09:04 -07:00
Xiang Li
7750f387b0 wal: better log msg 2015-04-22 15:08:50 -07:00
Xiang Li
e33ab24442 wal: never leave a corrupted wal file
If the process dies during wal.cut(), it might leave a corrupted wal
file. This commit solves the problem by creating a temp wal file first,
then atomically rename it to a wal file when we are sure it is vaild.

Conflicts:
	wal/wal.go
2015-04-22 15:08:42 -07:00
Xiang Li
fce2c1eeaf discovery: drop trailing . from srv target 2015-04-22 15:06:20 -07:00
Xiang Li
6a3bb93305 discovery: add a test case for srv
During srv discovery, it should try to match local member with
resolved addr and return unresolved hostnames for the cluster.

Conflicts:
	discovery/srv_test.go
2015-04-22 15:06:03 -07:00
Xiang Li
21455d2f3b *: stop using resolved tcp addr
We start to resolve host into tcp addrs since we generate
tcp based initial-cluster during srv discovery. However it
creates problems around tls and cluster verification. The
srv discovery only needs to use resolved the tcp addr to
find the local node. It does not have to resolve everything
and use the resolved addrs.

This fixes #2488 and #2226
2015-04-22 14:59:07 -07:00
Brian Akins
51bb4220c5 Clarify that it is the proxy doing the shuffle. 2015-04-22 14:58:54 -07:00
Brian Akins
d8c506923f proxy: shuffle endpoints
Shuffle endpoitns to avoid being "stuck" to a single cluster member.
2015-04-22 14:58:40 -07:00
Yicheng Qin
5d778f85ca *: bump to v2.0.9+git 2015-04-07 15:18:50 -07:00
Yicheng Qin
02697ca725 *: bump to v2.0.9 v2.0.9 2015-04-07 15:18:29 -07:00
Xiang Li
bd693c7069 etcdctl: refactor message in import command 2015-04-07 15:16:13 -07:00
Xiang Li
52c90cdcfb etcdctl: import hidden keys 2015-04-07 14:49:40 -07:00
Xiang Li
a88b22ac0a store: fix watcher removal 2015-04-07 14:46:10 -07:00
Yicheng Qin
e93f8b8a12 *: bump to v2.0.8+git 2015-03-31 14:29:38 -07:00
Yicheng Qin
86e616c6e9 *: bump to v2.0.8 v2.0.8 2015-03-31 14:29:13 -07:00
Barak Michener
5ae55a2c0d etcdctl: fix import typos 2015-03-31 13:48:18 -07:00
Xiang Li
62ce6eef7b etcdctl: main routine of import command should wait for goroutine existing 2015-03-31 13:26:15 -07:00
Xiang Li
7df4f5c804 build: do not build internal debugging tool
We are still playing around with the dump-log tool.
Stop building it publicly until we are happy with its
ux and functionality.
2015-03-31 13:26:05 -07:00
Xiang Li
461c24e899 etcdct: adopt new client port by default
etcdserver uses both 4001 and 2379 for serving client requests by
default. etcdctl supports both ports by default.
2015-03-31 13:25:56 -07:00
Xiang Li
6d90d03bf0 etcdctl: add migratesnap command 2015-03-31 13:25:39 -07:00
Yicheng Qin
9995e80a2c Revert "etcdhttp: add internalVersion"
This reverts commit a77bf97c147a93e5b78898b427d081ba11b8f118.

Conflicts:
	version/version.go

Conflicts:
	version/version.go
2015-03-31 13:25:22 -07:00
Xiang Li
229405f113 *: remove upgrading related stuff 2015-03-31 13:24:28 -07:00
Mateus Braga
b3f2a998d4 docs: add clarity about the 1000 events history
When talking about missing events on a particular key, the 1000 event history
limit can be understood as being per key, instead of etcd-wide events. Make it
clear that it is across all etcd keys.
2015-03-31 13:24:19 -07:00
Xiang Li
8436e901e9 etcdserver: loose member validation for joining existing cluster 2015-03-31 13:24:07 -07:00
Yicheng Qin
c03f5cb941 *: bump to v2.0.7+git 2015-03-24 23:14:38 -07:00
Yicheng Qin
0cb90e4bea *: bump to v2.0.7 v2.0.7 2015-03-24 23:07:57 -07:00
Yicheng Qin
df83b1b34e wal: fix missing import 2015-03-24 23:00:04 -07:00
Xiang Li
f2bef04009 wal: releastTo should work with large release index 2015-03-24 22:51:02 -07:00
Yicheng Qin
02198336f6 version: not return err NotExist in Detect 2015-03-24 22:50:44 -07:00
Yicheng Qin
0c9a226e0e etcdserver: print out extra files in data dir instead of erroring 2015-03-24 22:50:33 -07:00
Yicheng Qin
5bd1d420bb etcdserver: add join-existing check 2015-03-24 22:49:41 -07:00
Yicheng Qin
a1cb5cb768 etcdmain: print error when non-flag args remain 2015-03-24 22:49:31 -07:00
Yicheng Qin
acba49fe81 *: bump to v2.0.6+git 2015-03-23 14:05:08 -07:00
Yicheng Qin
e3c902228b *: bump to v2.0.6 v2.0.6 2015-03-23 13:52:00 -07:00
Yicheng Qin
52a2d143d2 migrate: remove starter code
It has been moved to github.com/coreos/etcd-starter.
2015-03-21 11:15:26 -07:00
招牌疯子
f53d550a79 store: fixed clone error for store stats. 2015-03-21 11:14:06 -07:00
Brandon Philips
63b799b891 migrate: detect version 2.0.1
Without this code a second start will crash:

```
$ ./bin/etcd -name foobar --data-dir=foobar
2015/03/18 18:06:28 starter: detect etcd version 2.0.1 in foobar
2015/03/18 18:06:28 starter: unhandled etcd version in foobar
panic: starter: unhandled etcd version in foobar

goroutine 1 [running]:
log.Panicf(0x594770, 0x25, 0x208927c70, 0x1, 0x1)
	/usr/local/go/src/log/log.go:314 +0xd0
github.com/coreos/etcd/migrate/starter.checkInternalVersion(0x20889a480, 0x0, 0x0)
	/Users/philips/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/migrate/starter/starter.go:160 +0xf2f
github.com/coreos/etcd/migrate/starter.StartDesiredVersion(0x20884a010, 0x3, 0x3)
	/Users/philips/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/migrate/starter/starter.go:77 +0x2a9
main.main()
	/Users/philips/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/main.go:46 +0x25e

goroutine 9 [syscall]:
os/signal.loop()
	/usr/local/go/src/os/signal/signal_unix.go:21 +0x1f
created by os/signal.init·1
	/usr/local/go/src/os/signal/signal_unix.go:27 +0x35
```
2015-03-21 11:13:55 -07:00
Brandon Philips
697883fb8c etcdmain: let user provide a name w/o initial-cluster update
Currently this doesn't work if a user wants to try out a single machine
cluster but change the name for whatever reason. This is because the
name is always "default" and the

```
./bin/etcd -name 'baz'
```

This solves our problem on CoreOS where the default is `ETCD_NAME=%m`.
2015-03-21 11:13:42 -07:00
Brandon Philips
f794f87f26 Documentation: fixup grammar around the unsafe flags 2015-03-21 11:13:28 -07:00
Xiang Li
0847986d4a etcdmain: identify data dir type 2015-03-21 11:12:18 -07:00
funkygao
9ea80c6ac1 raft: fix godoc about starting a node 2015-03-21 11:11:21 -07:00
Xiang Li
02fb648abf etcdmain: verify heartbeat and election flag 2015-03-21 11:11:09 -07:00
kmeaw
4c9e1686b1 pkg/flags: Add support for IPv6 addresses
Support IPv6 address for ETCD_ADDR and ETCD_PEER_ADDR

pkg/flags: Support IPv6 address for ETCD_ADDR and ETCD_PEER_ADDR

pkg/flags: tests for IPv6 addr and bind-addr flags

pkg/flags: IPAddressPort.Host: do not enclose IPv6 address in square brackets

pkg/flags: set default bind address to [::] instead of 0.0.0.0

pkg/flags: we don't need fmt any more

also, one minor fix: net.JoinHostPort takes string as a port value

pkg/flags: fix ipv6 tests

pkg/flags: test both IPv4 and IPv6 addresses in TestIPAddressPortString

etcdmain: test: use [::] instead of 0.0.0.0
2015-03-21 11:05:20 -07:00
Yicheng Qin
0fb9362c5c *: bump to v2.0.5+git 2015-03-11 17:00:51 -07:00
Yicheng Qin
9481945228 *: bump to v2.0.5 v2.0.5 2015-03-11 11:33:43 -07:00
Xiang Li
e13b09e4d9 wal: fix ReleaseLockTo
ReleaseLockTo should not release the lock on the WAL
segment that is right before the given index. When
restarting etcd, etcd needs to read from the WAL segment
that has a smaller index than the snapshot index.

The correct behavior is that ReleaseLockTo releases
the locks w is holding so that w only holds one lock
that has an index smaller than the given index.
2015-03-10 09:45:46 -07:00
Xiang Li
78e0149f41 raft: do not reset vote if term is not changed
raft MUST keep the voting information for the same term. reset
should not reset vote if term is not changed.
2015-03-10 09:42:45 -07:00
Xiang Li
4c86ab4868 pkg/transport: fix downgrade https to http bug in transport
If the TLS config is empty, etcd downgrades https to http without a warning.
This commit avoid the downgrade and stoping etcd from bootstrap if it cannot
listen on TLS.
2015-03-10 09:39:01 -07:00
Xiang Li
59327bab47 pkg/transport: set the maxIdleConnsPerHost to -1
for transport that are using timeout connections, we set the
maxIdleConnsPerHost to -1. The default transport does not clear
the timeout for the connections it sets to be idle. So the connections
with timeout cannot be reused.
2015-03-10 09:38:39 -07:00