Commit Graph

15320 Commits (2f30e9ad7fc533b258b95d2fc95db5bbb3a7514f)

Author SHA1 Message Date
Gyuho Lee 2f30e9ad7f etcdserver: document v2 usage in "publish" method
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-28 21:07:39 -05:00
Gyuho Lee ae87b21a72 tests/e2e: enable-v2 for v2 e2e tests
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-28 21:07:36 -05:00
Gyuho Lee 38128425b2 Documentation/op-guide: disable v2 by default
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-28 19:36:51 -05:00
Gyuho Lee ecb915617d embed: disable v2 by default
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-28 19:36:51 -05:00
Gyuho Lee 89d400211d
Merge pull request #10911 from gyuho/balancer
clientv3: fix secure endpoint failover, refactor with gRPC 1.22 upgrade
2019-07-26 14:50:54 -07:00
Gyuho Lee a7b8034e56 words: whitelist more
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-26 09:19:22 -07:00
Gyuho Lee 8a2a951d79 integration: match code.Canceled in "TestV3KVInflightRangeRequests"
Match new error codes in gRPC v1.22.0

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-26 09:19:22 -07:00
Gyuho Lee ba42e65b59 clientv3/integration: give more time for balancer resolution
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-26 09:19:22 -07:00
Gyuho Lee 8c7c6ec0c1 clientv3/balancer: refactor
refactor + remove unused

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-26 09:19:19 -07:00
Gyuho Lee 3dc00ab615 clientv3: move auth token credential to "credentials" package
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-26 09:17:44 -07:00
Gyuho Lee db61ee106c clientv3/credentials: set dial target "Authority" with target address
Overwrite authority when it's IP.

When user dials with "grpc.WithDialer", "grpc.DialContext" "cc.parsedTarget"
update only happens once. This is problematic, because when TLS is enabled,
retries happen through "grpc.WithDialer" with static "cc.parsedTarget" from
the initial dial call.
If the server authenticates by IP addresses, we want to set a new endpoint as
a new authority. Otherwise
"transport: authentication handshake failed: x509: certificate is valid for 127.0.0.1, 192.168.121.180, not 192.168.223.156"
when the new dial target is "192.168.121.180" whose certificate host name is also "192.168.121.180"
but client tries to authenticate with previously set "cc.parsedTarget" field "192.168.223.156"

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-26 09:17:40 -07:00
Gyuho Lee a6b105a907 embed: use new "credentials" package
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-26 08:56:45 -07:00
Gyuho Lee 7cbe2f5dd6 etcdserver/api/v3rpc: use new "credentials" package
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-26 08:56:38 -07:00
Gyuho Lee db7231accc clientv3: use new "credentials" package
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-26 08:56:33 -07:00
Gyuho Lee 324c876742 clientv3/credential: implement grpc/credentials.Bundle
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-26 08:56:05 -07:00
Gyuho Lee 4707d7a196 vendor: upgrade grpc-go to v1.22.1
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-26 08:53:09 -07:00
Gyuho Lee 12ab2ee3c4 clientv3: do not use pointer to TransportCredentials interface
Interface in Go is already reference

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-26 08:52:31 -07:00
Gyuho Lee 50babc16e7 etcdserver/api/v2v3: skip tests for CI
To fix in v3.5

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-26 05:54:58 -07:00
Xiang Li cf4b5d9c7f
Merge pull request #10938 from MasahikoSawada/updategoversion
README: require Go 1.12+
2019-07-25 22:59:34 -07:00
Masahiko Sawada 222dcc8d13 README: require Go 1.12+
Fixes #10937
2019-07-26 14:31:24 +09:00
Tobias Grieger e36e3ac6a7
Merge pull request #10917 from gyuho/raft-node
raft: improve logging around tick miss
2019-07-25 22:17:28 +02:00
Gyuho Lee 388d15f521
Merge pull request #10622 from philips/add-v2v3-tests
etcdserver: api/v2v3: add initial tests
2019-07-25 10:05:29 -07:00
Gyuho Lee 84a38045c9 CHANGELOG: move "--enable-v2v3" to 3.5
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-25 09:29:31 -07:00
Gyuho Lee c5dba11197
Merge pull request #10933 from ChrisRx/fix-embed-panic
embed: fix oob panic in zap logger
2019-07-25 06:56:31 -07:00
chris 2223142685 embed: fix oob panic in zap logger
This fixes an index out-of-bounds panic caused when using the embed
package and the zap logger. When a TLS handshake error is logged, the
slice for cert ip addresses is allocated with capacity but no length, so
subsequent index access causes the panic, and doesn't surface the TLS
handshake error to the user.

Fixes #10932
2019-07-25 09:42:42 -04:00
Gyuho Lee 1782469a76
Merge pull request #10928 from spzala/changelogdep
changelog: reflect the latest vendor dependencies
2019-07-25 06:19:13 -07:00
Sahdev P. Zala c63c988d03 changelog: reflect the latest vendor dependencies
Vendor dependencies are modified under,
https://github.com/etcd-io/etcd/pull/10918

Also, the protobuf module is mentioned twice so removing one.
2019-07-25 02:52:34 -04:00
Gyuho Lee c7c9428f6b raft: move "RawNode", clarify tick miss
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-24 23:35:36 -07:00
Gyuho Lee 8f000c755b
Merge pull request #10918 from gyuho/zap-go
vendor: upgrade dependencies
2019-07-24 21:59:36 -07:00
Jingyi Hu 425b65467c
Merge pull request #10907 from spzala/emptyrole10905
etcdserver: do not allow creating empty role
2019-07-24 18:51:43 -07:00
Sahdev P. Zala 1cef112a79 etcdserver: do not allow creating empty role
Like user, we should not allow creating empty role.

Related #10905
2019-07-24 17:41:24 -04:00
Gyuho Lee 46166ad733 vendor: update
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-24 14:09:50 -07:00
Tobias Grieger d137fa9d4a
Merge pull request #10920 from tbg/rawnode-ready
raft: require app to consume result from Ready()
2019-07-24 11:46:55 +02:00
Gyuho Lee 8b752ef647 CHANGELOG: update latest changes
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-23 15:36:14 -07:00
Tobias Schottdorf 721127da12 raft: require app to consume result from Ready()
I changed `(*RawNode).Ready`'s behavior in #10892 in a problematic way.
Previously, `Ready()` would create and immediately "accept" a Ready
(i.e. commit the app to actually handling it). In #10892, Ready() became
a pure read-only operation and the "accepting" was moved to
`Advance(rd)`.  As a result it was illegal to use the RawNode in certain
ways while the Ready was being handled. Failure to do so would result in
dropped messages (and perhaps worse). For example, with the following
operations

1. `rd := rawNode.Ready()`
2. `rawNode.Step(someMsg)`
3. `rawNode.Advance(rd)`

`someMsg` would be dropped, because `Advance()` would clear out the
outgoing messages thinking that they had all been handled by the client.
I mistakenly assumed that this restriction had existed prior, but this
is incorrect.

I noticed this while trying to pick up the above PR in CockroachDB,
where it caused unit test failures, precisely due to the above example.

This PR reestablishes the previous behavior (result of `Ready()` must
be handled by the app) and adds a regression test.

While I was there, I carried out a few small clarifying refactors.
2019-07-23 22:45:01 +02:00
Gyuho Lee a91f4e45c0
Merge pull request #10919 from gyuho/ci
*: test with Go 1.12.7
2019-07-23 13:09:01 -07:00
Wenjia 97bd2b3262
Update CHANGELOG-3.4.md for PR #10805 2019-07-23 12:48:28 -07:00
Gyuho Lee dfd62f04e9 *: test with Go 1.12.7
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-23 12:40:47 -07:00
Gyuho Lee a9047850de
Merge pull request #10805 from wenjiaswe/rebase-distroless
Dockerfile: Rebase etcd image to debian
2019-07-23 11:42:48 -07:00
Tobias Grieger d1183424bb
Merge pull request #10914 from tbg/api
raft: allow use of joint quorums
2019-07-23 11:49:08 +02:00
Tobias Schottdorf b9c051e7a7 raftpb: clean up naming in ConfChange 2019-07-23 10:40:03 +02:00
Tobias Schottdorf b67303c6a2 raft: allow use of joint quorums
This change introduces joint quorums by changing the Node and RawNode
API to accept pb.ConfChangeV2 (on top of pb.ConfChange).

pb.ConfChange continues to work as today: it allows carrying out a
single configuration change. A pb.ConfChange proposal gets added to
the Raft log as such and is thus also observed by the app during Ready
handling, and fed back to ApplyConfChange.

ConfChangeV2 allows joint configuration changes but will continue to
carry out configuration changes in "one phase" (i.e. without ever
entering a joint config) when this is possible.
2019-07-23 10:40:03 +02:00
Tobias Schottdorf 88f5561733 raft: use ConfChangeSingle internally 2019-07-23 10:39:48 +02:00
Tobias Schottdorf 10680744b9 raft: introduce protos for joint quorums 2019-07-23 10:39:48 +02:00
Wenjia Zhang f856ce963b Dockerfile: rebase etcd image to debian 2019-07-22 18:58:16 -07:00
Jingyi Hu fe86a786a4
Merge pull request #10904 from yuzeming/fixed-10899
integration: fix a data race about `i` and `tt` in TestV3WatchFromCur…
2019-07-19 17:51:21 -07:00
Jingyi Hu 39680c381e
Merge pull request #10908 from tbg/log
etcdserver: fix createConfChangeEnts
2019-07-19 17:45:27 -07:00
Xiang Li 9a69aa17c8
Merge pull request #10614 from jmillikin-stripe/cert-allowed-san-flags
etcdmain, pkg: Support peer and client TLS auth based on SAN fields.
2019-07-19 12:02:28 -07:00
Tobias Schottdorf eb4d9b640a etcdserver: fix createConfChangeEnts
It created a sequence of conf changes that could intermittently cause an
empty set of voters, which Raft asserts against as of #10889.

This fixes TestCtlV2BackupSnapshot and TestCtlV2BackupV3Snapshot, see:
https://github.com/etcd-io/etcd/issues/10700#issuecomment-512358126
2019-07-19 17:13:08 +02:00
Tobias Grieger 3c5e2f51e4
Merge pull request #10892 from tbg/rawnode-everywhere-attempt3
raft: use RawNode for node's event loop; clean up bootstrap
2019-07-19 14:30:08 +02:00