11854 Commits

Author SHA1 Message Date
Anthony Romano
426ad25924 transport: include InsecureSkipVerify in TLSInfo
Some functions take a TLSInfo to generate a tls.Config and there was no
way to force the InsecureSkipVerify flag.
2017-07-21 11:00:22 -07:00
Anthony Romano
7c22d35dff etcdmain: support grpc-proxy/gateway compiled with -tags cov 2017-07-21 11:00:22 -07:00
Anthony Romano
5c6a6bdc5a e2e: refactor to support -tags cluster_proxy 2017-07-21 11:00:22 -07:00
irfan sharif
a92ceeec25 raft: introduce/fix TestNodeWithSmallerTermCanCompleteElection
TestNodeWithSmallerTermCanCompleteElection tests the scenario where a
node that has been partitioned away (and fallen behind) rejoins the
cluster at about the same time the leader node gets partitioned away.
Previously the cluster would come to a standstill when run with PreVote
enabled.

When responding to Msg{Pre,}Vote messages we now include the term from
the message, not the local term. To see why consider the case where a
single node was previously partitioned away and it's local term is now
of date. If we include the local term (recall that for pre-votes we
don't update the local term), the (pre-)campaigning node on the other
end will proceed to ignore the message (it ignores all out of date
messages).
The term in the original message and current local term are the same in
the case of regular votes, but different for pre-votes.

NB: Had to change TestRecvMsgVote to include pb.Message.Term when
sending MsgVote messages. The new sanity checks on MsgVoteResp
(m.Term != 0) would panic with the old test as raft.Term would be equal
to 0 when responding with MsgVoteResp messages.
2017-07-21 02:26:02 -04:00
Hitoshi Mitake
488df4db34 proxy: don't inc a cache miss count in a case of linearizable range
Requests of linearizable range don't touch the cache of grpcproxy. So
incrementing the miss count wouldn't be meaningful.
2017-07-20 21:51:10 -07:00
Anthony Romano
a64d15eeed Merge pull request #8286 from heyitsanthony/wal-check-locks
wal: fall back to closing wal if locked dir rename fails
2017-07-20 18:52:08 -07:00
Beth Wright
2c4e22fd43 docs: link fix. 2017-07-20 13:35:55 -07:00
Anthony Romano
fe1ddab714 wal: fall back to closing wal if locked dir rename fails
Detecting windows at compile time isn't enough since etcd might be
on linux but the fs is backed by windows.

Fixes: #8178
Fixes: #6984
2017-07-20 13:30:41 -07:00
Xiang Li
fb717aec9b Merge pull request #8280 from jpbetz/compaction-metrics
mvcc: Add metric for count of db key revisions compacted.
2017-07-20 13:16:39 -07:00
Beth Wright
01a49a9f7e docs: slight rearranging of top two sections. 2017-07-20 12:04:05 -07:00
Joe Betz
c06953ae08 mvcc: Add metric for count of db key revisions compacted.
When digging into etcd/boltdb "storage space exceeded" issues, this metric may help answer questions about if/when compactions occured and how much data was freed.
2017-07-20 10:07:56 -07:00
Anthony Romano
46ee06a85c Merge pull request #8284 from heyitsanthony/whitelist-close
testutil: whitelist os.(*file).close
2017-07-19 21:32:55 -07:00
mangoslicer
887df72d13 clientv3/ordering: kv order caching 2017-07-19 21:40:50 -04:00
Gyu-Ho Lee
cfbf666dd4 Merge pull request #8285 from gyuho/news
NEWS: add v3.2.4
2017-07-19 14:51:36 -07:00
Gyu-Ho Lee
55d445b891 NEWS: add v3.2.4
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-07-19 14:39:43 -07:00
Anthony Romano
bb42d2b40e testutil: whitelist os.(*file).close
Leak detector is catching goroutines trying to close files which appear
runtime related:

1 instances of:
syscall.Syscall(...)
	/usr/local/golang/1.8.3/go/src/syscall/asm_linux_386.s:20 +0x5
syscall.Close(...)
	/usr/local/golang/1.8.3/go/src/syscall/zsyscall_linux_386.go:296 +0x3d
os.(*file).close(...)
	/usr/local/golang/1.8.3/go/src/os/file_unix.go:140 +0x62

It's unlikely a user goroutine will leak on file close; whitelist it.
2017-07-19 13:28:15 -07:00
Gyu-Ho Lee
608df0fc90 Merge pull request #8272 from gyuho/health
/health reports unhealthy when alarm is raised
2017-07-18 16:15:08 -07:00
Gyu-Ho Lee
9dc65936b1 Merge pull request #8279 from gyuho/aaa
contrib/raftexample: use bytes.Buffer.String (no 'string()')
2017-07-18 16:09:17 -07:00
Gyu-Ho Lee
f78498b42a contrib/raftexample: use bytes.Buffer.String (no 'string()')
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-07-18 16:06:22 -07:00
Gyu-Ho Lee
91470a8a54 e2e: test '/health' when alarm is raised 2017-07-18 15:51:30 -07:00
Gyu-Ho Lee
61a736a068 etcdserver: check alarms in health handler
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-07-18 15:51:28 -07:00
Gyu-Ho Lee
d8481c9fda Merge pull request #8278 from gyuho/cherry-pick
Documentation/integrations: add 'networking-vpp', raft lib users
2017-07-18 15:50:03 -07:00
Joseph Jacks
45206b6edf Documentation/integrations: add link to etcd raft lib users 2017-07-18 15:47:42 -07:00
iawells
21232017fa Documentation/integrations: add 'networking-vpp' 2017-07-18 15:44:39 -07:00
Gyu-Ho Lee
82126a742e Merge pull request #8274 from lclarkmichalek/patch-2
Add lclarkmichalek/etcdhcp to integrations list
2017-07-18 09:25:09 -07:00
Laurie Clark-Michalek
ebb7649e3d Documentation: Add lclarkmichalek/etcdhcp to integrations list 2017-07-18 17:01:28 +01:00
Gyu-Ho Lee
9ce7bb6a1c Merge pull request #8267 from gyuho/close-server
embed: wait up to request-timeout for pending RPCs when closing
2017-07-14 18:51:54 -07:00
fanmin shi
fbb75d24a4 v3rpc: add HashKV to server rpc 2017-07-14 16:44:00 -07:00
fanmin shi
3dcd2cdcb4 doc: update rpc swagger for HashKV rpc and its req/resp 2017-07-14 16:42:04 -07:00
fanmin shi
ed052ce9a3 proto: add HashKV grpc
HashKV rpc hash of all MVCC keys up to a given revision for a given node.
2017-07-14 16:41:23 -07:00
Gyu-Ho Lee
34fd848a4f integration: test embed.Etcd.Close with watch
Ensure 'Close' returns in time when there are open
connections (watch streams).

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-07-14 15:32:08 -07:00
Gyu-Ho Lee
334554f655 embed: wait up to request timeout for pending RPCs when closing
Both grpc.Server.Stop and grpc.Server.GracefulStop close the listeners
first, to stop accepting the new connections. GracefulStop blocks until
all clients close their open transports(connections). Unary RPCs
only take a few seconds to finish. Stream RPCs, like watch, might never
close the connections from client side, thus making gRPC server wait
forever.

This patch still calls GracefulStop, but waits up to 10s before manually
closing the open transports.

Address https://github.com/coreos/etcd/issues/8224.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-07-14 15:31:40 -07:00
Gyu-Ho Lee
d28334831d Merge pull request #8242 from gyuho/ppp
*: support additional '/metrics' endpoints
2017-07-14 15:06:15 -07:00
Gyu-Ho Lee
c47d4450c7 etcdmain/grpc-proxy: add 'metrics-addr' option
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-07-14 11:14:09 -07:00
Gyu-Ho Lee
8463b377d9 etcdmain: add 'listen-metrics-urls' option
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-07-14 11:14:09 -07:00
Gyu-Ho Lee
9bb5ede659 embed: configure 'ListenMetricsUrls'
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-07-14 11:14:05 -07:00
Anthony Romano
511f4d5c99 Merge pull request #8266 from heyitsanthony/fix-contributing-irc
Documentation: point contributing irc channel to #etcd
2017-07-14 11:06:39 -07:00
Anthony Romano
89e4b62a01 Documentation: point contributing irc channel to #etcd 2017-07-14 10:56:09 -07:00
Gyu-Ho Lee
5133d8e993 Merge pull request #8265 from gyuho/news
NEWS: add v3.1.10, v3.2.3
2017-07-14 10:55:03 -07:00
Gyu-Ho Lee
fe0941426d NEWS: add v3.1.10, v3.2.3
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-07-14 09:57:20 -07:00
Anthony Romano
858938e32d Merge pull request #8259 from heyitsanthony/etcdctl-err-space
etcdctl: remove extra space in error message
2017-07-14 09:55:06 -07:00
Anthony Romano
7ff1e8f3bb Merge pull request #8261 from heyitsanthony/fix-test-leasettl
integration: sync lapi server after puts in TestLeaseTimeToLive
2017-07-13 21:31:18 -07:00
Anthony Romano
755270fa6a integration: sync lapi server after puts in TestLeaseTimeToLive
Linearized read to ensure the keys have committed.
2017-07-13 14:55:43 -07:00
Anthony Romano
3614c5185d e2e: update tests to use single space for etcdctl errors 2017-07-13 14:27:46 -07:00
Anthony Romano
28b4dce4f1 etcdctl: remove extra space in error message
Fprintln will insert a space between arguments, so printing "Error: "
would lead to two spaces between the "Error:" and the error string.
2017-07-13 13:04:21 -07:00
Gyu-Ho Lee
3dd7de3908 Merge pull request #8252 from gyuho/test-functional
test: sync with etcd-agent start in functional_pass
2017-07-13 11:13:26 -07:00
Anthony Romano
14401021ee Merge pull request #8251 from heyitsanthony/whitelist-wg-done
testutil: whitelist WaitGroup.Done
2017-07-13 09:26:15 -07:00
Gyu-Ho Lee
02585157f6 test: sync with etcd-agent start in functional_pass
Fix https://github.com/coreos/etcd/issues/8211.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-07-13 09:17:42 -07:00
Anthony Romano
026e05518e testutil: whitelist WaitGroup.Done
Calling a WaitGroup.Done() in a defer will sometimes trigger the leak
detector since the WaitGroup.Wait() will unblock before the defer
block completes. If the leak detector runs before the Done() is
rescheduled, it will spuriously report the finishing Done() as a leak.
This happens enough in CI to be irritating; whitelist it and ignore.
2017-07-12 14:04:24 -07:00
Anthony Romano
17be3b551a Merge pull request #8250 from heyitsanthony/reorg-op-guide
Documentation, op-guide: reorganize etcd operation section
2017-07-12 13:28:00 -07:00