4633 Commits

Author SHA1 Message Date
Yicheng Qin
176222a2f4 *: bump to v2.0.13+git 2015-06-25 14:10:43 -07:00
Yicheng Qin
92e3895214 *: bump to v2.0.13 v2.0.13 2015-06-25 14:10:15 -07:00
Yicheng Qin
b12a52b0fd etcdmain: fix the check in fallback-to-proxy case
advertise-client-urls has to be set if listen-client-urls is set when
fallbacking to proxy, which breaks the behavior. Loosen the check to fix
it.
2015-06-25 14:07:45 -07:00
Yicheng Qin
9fa4002787 *: bump to v2.0.12+git 2015-06-16 14:20:25 -07:00
Yicheng Qin
5686c33e4b *: bump to v2.0.12 v2.0.12 2015-06-16 14:19:37 -07:00
Yicheng Qin
6fd2dfdebc etcdmain: fix that advertise-client-urls is required in proxy mode
etcd proxy doesn't need to set advertise-client-urls because the flag is
not used.
2015-06-16 14:18:01 -07:00
Connor and Luan Santos
896ce1668c build: default git sha to GitNotFound in case git fails 2015-06-16 14:15:48 -07:00
Ryan Bourgeois
0520b4cd24 proxy: Reuse a bytes buffer as proxy request body.
The call to transport.RoundTrip closes the request body regardless of
the value of request.Closed. This causes subsequent calls to RoundTrip
using the same request body to fail.

Fixes #2895
2015-06-16 14:13:15 -07:00
Yicheng Qin
6ee6f72c48 etcdmain: increase maxIdleConnsPerHost in proxy transport
This PR set maxIdleConnsPerHost to 128 to let proxy handle 128 concurrent
requests in long term smoothly.
If the number of concurrent requests is bigger than this value,
proxy needs to create one new connection when handling each request in
the delta, which is bad because the creation consumes resource and may
eat up your ephemeral port.
2015-06-16 14:10:58 -07:00
Xiang Li
b4dd519a63 raft: fix raft node start bug
raft node should set initial prev hard state to empty.
Or it will not send the first hard coded state to application
until the state changes again.

This commit fixs the issue. It introduce a small overhead, that
the same tate might send to application twice when restarting.
But this is fine.
2015-06-16 14:10:41 -07:00
Yicheng Qin
a98fff84e7 etcdctl/cluster_health: improve output if failed to get leader stats
When failing to get leader stats, it said 'cluster is unhealthy' before.
This is confusing when it cannot get stats because advertised client urls
are set wrong and the cluster is healthy.
2015-06-16 14:07:45 -07:00
Yicheng Qin
973cfbebda *: make dial timeout configurable
Dial timeout is set shorter because
1. etcd is supposed to work in good environment, and the new value is long
enough
2. shorter dial timeout makes dial fail faster, which is good for
performance

Conflicts:
	etcdmain/etcd.go
2015-06-16 14:06:18 -07:00
Yicheng Qin
00d1d34cf8 Merge pull request #2832 from yichengq/stream-2.1
not print unhelpful info when connecting to etcd 2.1
2015-05-27 13:36:38 -07:00
Yicheng Qin
fcf81fd6bf *: bump to v2.0.11+git 2015-05-15 13:55:13 -07:00
Yicheng Qin
0678329cd6 *: bump to v2.0.11 v2.0.11 2015-05-15 13:54:32 -07:00
Xiang Li
9a0e0c2eae etcdmain: better error msg when detected duplicate id in discovery
Conflicts:
	etcdmain/etcd.go
2015-05-15 13:47:02 -07:00
mischief
3e4d57c37d pkg/fileutil: add plan9 lockfile support 2015-05-15 13:35:51 -07:00
Mohammad Samman
d30e764b2d version: added more version information
added more version information output to aid debugging
print etcd Version, Git SHA, Go runtime version, OS
and architecture

Fixes #2560

Conflicts:
	version/version.go
2015-05-15 12:34:33 -07:00
Yicheng Qin
b5b7c78f1b docs: proxy needs accessible advertise client urls
Users cannot use proxy if -advertise-client-urls is set correctly.
Especially mention this in the doc to help them bypass the wrong
settings.
2015-05-15 12:32:58 -07:00
Shota Fukumori (sora_h)
ee1c07c3d4 proxy: Fix connection leak when client disconnect
established connections were leaked when client disconnected before
proxyreq completes. This happens all time for wait=true requests.
2015-05-15 12:32:49 -07:00
Yicheng Qin
67c5d4dfd2 etcdmain: advertise-client-urls must be set if listen-client-urls is set
Before this PR, people can set listen-client-urls without setting
advertise-client-urls, and leaves advertise-client-urls as default
localhost value. The client libraries which sync the cluster info
fetch wrong advertise-client-urls and cannot connect to the cluster.
This PR avoids this case and provides better UX.

On the other hand, this change is safe because people always want to set
advertise-client-urls if listen-client-urls is set. The default localhost
advertise url cannot be accessed from the outside, and should always be
set except that etcd is bootstrapped with no flag.

Conflicts:
	etcdmain/etcd.go
2015-05-15 12:32:35 -07:00
Giuseppe Lavagetto
3afcbd6f83 docs: clarify the disaster recovery guide
A bit was missing from the documentation on disaster recovery, the reset
of the advertised peer urls for the node recovered from backup. Without
that, any subsequent server joining the cluster would not be able to
speak to the first node.
2015-05-15 12:30:48 -07:00
Xiang Li
8fed61b2eb client: 410 is a vaild response for member.Remove
When removing a member, etcdserver might return 410 that indicates
the member has been removed. To client, 410 is a vaild response since
the client might do internal retry.
2015-05-15 12:30:37 -07:00
Alexander Kolbasov
c8d386e18c pkg/fileutil: add filelock support for solaris 2015-05-15 11:30:40 -07:00
xujun
2b6a44b7b0 raft: fix typo in raftlog
fix typo in String() method of raftlog which will misorder
the "committed" and "unstable.offset" output.
2015-05-15 11:30:32 -07:00
Yicheng Qin
8069d08b96 etcdserver: init server stats before passing it as argument
It is more reasonable to init the variable before passing it as an
argument.

It fixes a bug that etcdserver may panic on server stats when processing
a message from rafthttp streamReader before server stats is initialized
in server.Start().
2015-05-15 11:30:23 -07:00
Yicheng Qin
5074235254 rafthttp: stop printing log when attaching stream with the same term
There is no need to print log when attaching stream with the same
term because the stream is installed back immediately.

This happens a lot when etcd 2.1 connects to etcd 2.0, so we make
the change.
2015-05-14 21:52:59 -07:00
Yicheng Qin
f59bddd74b rafthttp: not log endpoint unsupport error
The error happens a lot when running 2.0 together with 2.1, and is
totally unhelpful.
2015-05-07 14:21:15 -07:00
Yicheng Qin
58f035844c Merge pull request #2753 from yichengq/fix-remove-panic
backport #2701 to release-2.0 branch
2015-04-28 21:17:55 -07:00
Xiang Li
f83774b4cd integration: add tests around the membership change issues 2015-04-24 13:49:17 -07:00
Yicheng Qin
12c32137a8 rafthttp: add AddRemote
Add remotes to rafthttp, who help newly joined members catch up the
progress of the cluster. It supports basic message sending to remote, and
has no stream connection for simplicity. remotes will not be used
after the latest peers have been added into rafthttp.

Conflicts:
	rafthttp/pipeline.go
	rafthttp/transport.go
2015-04-24 13:37:16 -07:00
Yicheng Qin
fce4cf4dc8 Revert "etcdserver: fix cluster fallback recovery"
This reverts commit cff005777a40bcf3a5bea3e87387273afe054ce1.
2015-04-24 13:06:43 -07:00
Yicheng Qin
06a72b2702 *: bump to v2.0.10+git 2015-04-22 15:21:59 -07:00
Yicheng Qin
fbaef05885 *: bump to v2.0.10 v2.0.10 2015-04-22 15:21:38 -07:00
Brandon Philips
31a94d28e3 etcdctl: add extended as output format
extended wasn't documented in the help as one of the output formats, fix
this!

Conflicts:
	etcdctl/main.go
2015-04-22 15:11:06 -07:00
Xiang Li
88660a303f snap: load should only return ErrNoSnapshot
If there is no available snapshot, load should return
ErrNoSnapshot. etcdserver might recover from that error
if it still have complete WAL files.
2015-04-22 15:09:38 -07:00
Xiang Li
53c74dbd0b etcdserver: prevExist=true + condition is compareAndSwap
PrevExist indicates the key should exist. Condition compares with
an existing key. So PrevExist+condition = CompareAndSwap not Update.
2015-04-22 15:09:28 -07:00
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