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
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
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
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
Tobias Schottdorf
b9c051e7a7
raftpb: clean up naming in ConfChange
2019-07-23 10:40:03 +02:00
lzhfromustc
8194aa3f03
Fixed a missing block bug
...
Description: w.mu is locked at line 385 and unlocked at line 396. Among 5 return statements in this function, 4 are below line 396 but there is 1 return at line 387.
Fix: Add w.mu.Unlock() before that return at line 387.
2019-06-28 11:27:13 -07:00
Gyuho Lee
1caaa9ed4a
test: test update for Go 1.12.5 and related changes
...
Update to Go 1.12.5 testing. Remove deprecated unused and gosimple
pacakges, and mask staticcheck 1006. Also, fix unconvert errors related
to unnecessary type conversions and following staticcheck errors:
- remove redundant return statements
- use for range instead of for select
- use time.Since instead of time.Now().Sub
- omit comparison to bool constant
- replace T.Fatal and T.Fatalf in tests with T.Error and T.Fatalf respectively because the goroutine calls T.Fatal must be called in the same goroutine as the test
- fix error strings that should not be capitalized
- use sort.Strings(...) instead of sort.Sort(sort.StringSlice(...))
- use he status code of Canceled instead of grpc.ErrClientConnClosing which is deprecated
- use use status.Errorf instead of grpc.Errorf which is deprecated
Related #10528 #10438
2019-06-05 17:02:05 -04:00
Xiang Li
ea0f919cdc
Merge pull request #10775 from jingyih/integration_member_promote_failed_cases
...
clientv3/integration: add member promote failure test cases
2019-06-02 20:39:00 -07:00
Jingyi Hu
ec17872c98
integration: add member promote failure test cases
...
Add TestMemberPromoteMemberNotLearner and
TestMemberPromoteMemberNotExist.
2019-05-31 10:52:54 -07:00
Hitoshi Mitake
5a67dd788d
*: support creating a user without password
...
This commit adds a feature for creating a user without password. The
purpose of the feature is reducing attack surface by configuring bad
passwords (CN based auth will be allowed for the user).
The feature can be used with `--no-password` of `etcdctl user add`
command.
Fix https://github.com/coreos/etcd/issues/9590
2019-05-30 21:59:30 +09:00
Xiang Li
23a89b0f09
Merge pull request #10755 from wrfly/patch-3
...
fix #10754
2019-05-28 20:50:52 -07:00
Shaun
3754767dbc
clientv3: return getToken error when retryAuth
2019-05-29 10:15:22 +08:00
Jingyi Hu
6bf609b96d
integration: update TestMemberPromote test
...
Update TestMemberPromote to include both learner not-ready and learner
ready test cases.
Removed unit test TestPromoteMember, it requires underlying raft node to
be started and running. The member promote is covered by the integration
test.
2019-05-28 18:50:13 -07:00
Jingyi Hu
f8ad8ae4ad
etcdserver: use etcdserver ErrLearnerNotReady
...
If learner is not ready to be promoted, use etcdserver.ErrLearnerNotReady
instead of using membership.ErrLearnerNotReady.
2019-05-28 18:50:13 -07:00
宇慕
dfe296ac3c
etcdserver: add mayPromote check
2019-05-28 18:47:03 -07:00
Jingyi Hu
7a4d233bab
clientv3/integration: better way to deflake test
...
Use ReadyNotify instead of time.Sleep to wait for server ready.
2019-05-28 18:47:03 -07:00
Jingyi Hu
aa4cda2f5c
etcdserver: allow 1 learner in cluster
...
Hard-coded the maximum number of learners to 1.
2019-05-28 18:47:03 -07:00
Jingyi Hu
d0c1b3fa38
etcdserver: learner return Unavailable for unsupported RPC
...
Make learner return code.Unavailable when the request is not supported
by learner. Client balancer will retry a different endpoint.
2019-05-28 18:47:03 -07:00
Gyuho Lee
34bd797e67
*: revert module import paths
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-05-28 15:39:35 -07:00
Gyuho Lee
11d3f74c33
Merge pull request #10744 from philips/drop-readthedocs
...
*: move to etcd.io for docs
2019-05-27 03:02:01 -07:00
Inconnu08
2eaed14def
clientv3: fix typo in test filename
2019-05-27 13:53:58 +06:00
Brandon Philips
c5e5240004
*: move to etcd.io for docs
...
Remove all readthedocs references for https://etcd.io to ensure the SEO
goes to the right place.
2019-05-20 14:32:08 -07:00
Jingyi Hu
23f1d02391
*: address comments
2019-05-15 15:58:46 -07:00
Jingyi Hu
90d28c0de7
clientv3/integration: deflake TestKVForLearner
...
Adding delay in the test for the newly started learner member to catch
up applying config change entries in raft log.
2019-05-15 13:58:28 -07:00
Jingyi Hu
b23c8f3e8f
clientv3/integration: fix cluster tests
...
Fixes TestMemberAddForLearner and TestMemberPromoteForLearner.
2019-05-15 13:58:26 -07:00
WizardCXY
a039f2efb8
clientv3, etcdctl: MemberPromote for learner
2019-05-15 13:48:52 -07:00
WizardCXY
7f9479acc1
clientv3: add member promote
2019-05-15 13:27:42 -07:00
Jingyi Hu
57a11eb1e1
integration: add TestKVForLearner
...
Adding TestKVForLearner. Also adding test utility functions for clientv3
integration tests.
2019-05-15 13:27:38 -07:00
Jingyi Hu
2b76200f70
*: add MemberAddAsLearner to clientv3 Cluster API
...
Made changes to Clientv3 Cluster API:
- Added MemberAddAsLearner.
- Reverted changes to MemberAdd - removed input parameter isLearner.
2019-05-14 16:56:44 -07:00
Jingyi Hu
fc14608cb7
clientv3: support MemberAdd for learner
...
Added IsLearner flag to clientv3 MemberAdd API.
2019-05-14 13:10:22 -07:00
Jingyi Hu
a0d3c4d641
*: fix compilation after API change
...
Fixed compilation erros after API change for learner.
2019-05-14 13:10:22 -07:00
rohitsardesai83
42a7ea6d33
etcd: Replace ghodss/yaml with sigs.k8s.io/yaml
...
To remove the dependency on ghodss/yaml. Replaced this dependency with sigs.k8s.io/yaml.
This wil help to remove the ghodss/yaml dependency from main kubernetes repository.
xref: https://github.com/kubernetes/kubernetes/issues/77024
2019-05-02 12:34:36 +05:30
Gyuho Lee
e899023f3f
Merge pull request #10640 from shrajfr12/gomodulecompat
...
Fix module path to have the major version to comply with go modules specification.
2019-05-01 22:46:03 -07:00
Xiang Li
fc6936863a
Merge pull request #10582 from johncming/empty_update
...
clientv3/naming: ignore empty update.
2019-04-30 14:21:56 -07:00
Xiang Li
1bd02b2053
Merge pull request #10595 from johncming/locking
...
clientv3: modify lock type.
2019-04-30 14:19:02 -07:00
shivaramr
9150bf52d6
go modules: Fix module path version to include version number
2019-04-26 15:29:50 -07:00
Joe Betz
c7c6894527
Merge pull request #10551 from johncming/lbname
...
clientv3/balancer: change balancer name to builder name.
2019-04-10 16:16:51 -07:00
zhoulin xie
cc08c1bd2e
clientv3/integration/leasing_test.go: Fix t.Fatalf error message
...
Signed-off-by: zhoulin xie <zhoulin.xie@daocloud.io>
2019-04-10 13:19:50 -04:00
johncming
9b5c468dc6
clientv3: modify lock type.
2019-03-29 21:02:13 +08:00
johncming
cb39c97b22
clientv3/naming: ignore empty update.
2019-03-25 10:53:24 +08:00
mengjin
41f7142ff9
doc: fix document example error
2019-03-21 08:21:03 -04:00
Xiang Li
09d0844379
Merge pull request #10548 from jingyih/add_TestMemberAddWithExistingURLs
...
clientv3/integration: Add TestMemberAddWithExistingURLs
2019-03-19 15:23:15 -07:00
Jingyi Hu
9bd86a647f
clientv3: Add TestMemberAddWithExistingURLs
...
TestMemberAddWithExistingURLs ensures adding a new member with URLs
already being used in the cluster will not succeed.
2019-03-18 12:48:44 -07:00
johncming
ddff08ffad
clientv3/balancer: change balancer name to builder name.
2019-03-18 11:05:22 +08:00
johncming
662fd55084
clientv3: clean up unused code.
2019-03-18 10:34:41 +08:00
Xiang Li
e1ca3b4434
Merge pull request #10531 from JoeWrightss/patch-3
...
Fix some variable spelling errors
2019-03-12 12:09:09 -07:00
zhoulin xie
939b4f8599
clientv3/balancer/grpc1.7-health.go: Fix variable spelling error
...
Signed-off-by: zhoulin xie <zhoulin.xie@daocloud.io>
2019-03-10 01:11:02 +08:00
Xiang Li
4dc9d8b058
Merge pull request #10503 from spzala/v3argorder10431
...
clientV3: fix behavior of WithPrefix and WithFromKey functions
2019-03-08 11:59:17 -08:00
Xiang Li
e80d1745be
Merge pull request #10420 from spzala/watch10340
...
clientV3watch: do not return ctx canceled when Close watch
2019-03-08 11:57:44 -08:00
Sahdev P. Zala
b25edb62cc
clientV3watch: Watch Close should close successfully
...
Closing of watch by client will cancel the watch grpc stream and
can produce a context canceled error. However, since client
simply wanted to close the watcher the error can create confusion
that something went wrong instead of a successful close. Ensure
that Close do not return error.
Fixed #10340
2019-02-28 20:43:20 -05:00
Sahdev P. Zala
8782bbae65
clientV3: fix behavior of WithPrefix and WithFromKey functions
...
The use of WithPrefix() and WithFromKey() together is not supported. The
client doesn't respect this behavior currently.
Fixes #10431
2019-02-27 09:23:01 -05:00
Xiang Li
17de9bd526
Merge pull request #10501 from datuanmac/replacing_http_by_https
...
doc: Replacing 'HTTP' by 'HTTPS' for securing links
2019-02-27 14:08:24 +08:00
Tuan Do Anh
32389b1876
doc: Replacing 'HTTP' by 'HTTPS' for securing links
...
Currently, when we access the URL https://www.grpc.io , it is redirected to https://www.grpc.io automatically.
So this commit aims to replace **HTTP** to **HTTPs** for security.
2019-02-27 10:15:22 +07:00
Gyuho Lee
4f46b65748
clientv3: use default info level log configuration
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-02-21 10:57:38 -08:00
caoming
94b782e7c9
clientv3/integration: add timeout case.
2019-02-18 09:38:49 +08:00
Gyuho Lee
6af8ce6c60
clientv3: clarify retry interceptor logging
...
Log only when it errors + some clarification
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-02-15 08:48:37 -08:00
Xiang Li
3546c4868c
Merge pull request #10445 from spzala/fromkey9833
...
clientv3: fix WithFromKey
2019-02-07 14:50:13 -08:00
Sahdev P. Zala
313ab0ba47
clientv3: fix WithFromKey
...
The WithFromKey func should not return error similar to etcdctl usage
of it when an empty key is provided.
Fixed #9833
2019-02-02 19:21:49 -05:00
cfc4n
a033686acf
clientv3/integration: return err if err == rpctypes.ErrAuthNotEnable
2019-02-02 14:06:54 +08:00
Gyuho Lee
61218004c0
clientv3: remove "JitterUp" imports
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-01-03 11:00:45 -08:00
Gyuho Lee
510ae3d2a2
clientv3/concurrency: fix govet errors
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-12-05 18:28:13 -08:00
Derrick J. Wippler
7d7266d3c9
concurrency: set keyPrefix when calling ResumeElection()
...
This change allows users to use Observe() after resuming an election as
Observe() requires a valid keyPrefix to function properly.
2018-12-05 14:50:56 -06:00
Philipp Gillé
0cfc01b873
clientv3: Fix spelling in comment
2018-11-12 22:33:48 +01:00
Shin'ya Ueoka
aa4313a55a
*: fix github links
2018-11-10 11:14:18 +09:00
Joe Betz
6a43db1eff
clientv3: Fix concurrent clientv3 client creation in 3.4 by using proper UUIDs
2018-10-22 14:08:58 -07:00
Joe Betz
49450aaa60
clientv3: Clarify lessor KeepAlive docs
2018-10-11 15:11:28 -07:00
yura
64e8b2e905
clientv3: concurrency.Mutex.Lock() - preserve invariant
...
Convenient invariant:
- if werr == nil then lock is supposed to be locked at the moment.
While we could not be confident in stronger invariant ('is exactly locked'),
it were inconvenient that previous code could return `werr == nil` after
Mutex.Unlock.
It could happen when ctx is canceled/timeouted exactly after waitDeletes
successfully returned werr == nil and before `<-ctx.Done()` checked.
While such situation is very rare, it is still possible.
fixes #10111
2018-10-05 14:17:32 +03:00
Jingyi Hu
87beb8336f
clientv3: add test for snapshot status
...
Add unit test to check if we can correctly identify a corrupted snapshot
backup file.
2018-10-03 18:17:19 -07:00
Jingyi Hu
7d57ee3427
clientv3: fix goword checking in config.go
2018-10-02 23:02:10 -07:00
Sahdev P. Zala
f6f375109e
clientv3: let etcd client use all available keepalive ClientParams
...
We should allow etcd client use all of the available keepalive
client parameters as documented in this link,
https://godoc.org/google.golang.org/grpc/keepalive#ClientParameters
Currently in the etcd, by default PermitWithoutStream is set to
false, and user has no way to override it.
On the server side, we explicitely setting EnforcementPolicy
PermitWithoutStream to false and don't provide option to override it
to user but on the client side we should allow this option as
provided by the grpc.
2018-10-02 15:51:27 -04:00
Gyuho Lee
fb674833c2
Merge pull request #10094 from nolouch/drop-read
...
server: drop read request if the leader is changed
2018-09-23 19:32:44 -07:00
Jingyi Hu
422f867f6b
clientv3: add integrity check in snapshot status
...
Add snapshot file integrity check in snapshot status. If the file is
corrupted, return with error message.
2018-09-20 12:59:27 -07:00
nolouch
6ea54195a6
client/integration: try to fix tests
2018-09-18 01:44:57 +08:00
nolouch
c15fb607f6
server: broadcast leader changed
2018-09-17 14:15:04 +08:00
nolouch
fd5ef74b80
clientv3/integration: try to fix tests
2018-09-14 17:57:56 +08:00
nolouch
f3f6427586
server: prevent blocking
2018-09-14 16:08:29 +08:00
nolouch
4de27039cb
server: drop read request if found leader changed
2018-09-14 15:58:35 +08:00
Gyuho Lee
001bbb97cc
Merge pull request #9999 from vimalk78/9377_document_election_api
...
clientv3/concurrency: Document Election API context parameter
2018-09-13 10:47:23 -07:00
Vimal K
35fa6e13b9
clientv3/concurrency: Document Election API context parameter
...
fixes #9377
2018-09-13 12:15:01 +05:30
Xiang Li
ec5ff10436
Merge pull request #10019 from thrawn01/grpc-proxy-watch-errors
...
Improve watch error reporting when using grpc proxy
2018-09-10 12:54:33 -07:00
Gyuho Lee
484f622034
Merge pull request #10054 from vcaesar/docs-pr
...
client,clientv3: update client docs to "go.etcd.io"
2018-08-30 16:44:16 -07:00
vcaesar
fc7ef659cc
client,clientv3: update client docs to "go.etcd.io"
2018-08-30 19:26:12 -04:00
Shin'ya UEOKA
e9afd51f47
clientv3/doc: Fix code example
2018-08-30 22:10:58 +00:00
Gyuho Lee
d627719881
Merge pull request #10050 from gyuho/bbolt
...
vendor: use "go.etcd.io/bbolt" v1.3.1-etcd.7
2018-08-30 10:20:53 -07:00
Gyuho Lee
572d486c5b
*: update github links
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-29 14:28:36 -07:00
Gyuho Lee
8db439d693
*: use "go.etcd.io/bbolt"
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-29 12:31:28 -07:00
Gyuho Lee
839f202195
clientv3/integration: fix race condition from closing channel
...
Go 1.11 now marks len(channel) over being-closed channel
as racey operation, fix tests by receiving from channel first
and then check the length of channel.
```
WARNING: DATA RACE
Write at 0x00c000e872c0 by goroutine 198:
runtime.closechan()
/usr/local/go/src/runtime/chan.go:327 +0x0
go.etcd.io/etcd/clientv3.(*lessor).closeRequireLeader()
/Users/leegyuho/go/src/go.etcd.io/etcd/clientv3/lease.go:379 +0x748
go.etcd.io/etcd/clientv3.(*lessor).recvKeepAliveLoop()
/Users/leegyuho/go/src/go.etcd.io/etcd/clientv3/lease.go:455 +0x3a5
Previous read at 0x00c000e872c0 by goroutine 27:
go.etcd.io/etcd/clientv3/integration.TestLeaseWithRequireLeader()
/Users/leegyuho/go/src/go.etcd.io/etcd/clientv3/integration/lease_test.go:828 +0x810
testing.tRunner()
/usr/local/go/src/testing/testing.go:827 +0x162
```
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-28 22:27:11 -07:00
Gyuho Lee
07fcc26799
*: fix gofmt warnings with Go 1.11
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-28 21:45:24 -07:00
Gyuho Lee
0ef9ef3c74
*: rerun "gofmt"
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-28 18:25:39 -07:00
Gyuho Lee
2ac04381a2
clientv3: update Go import paths to "go.etcd.io"
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-28 17:47:55 -07:00
Louis-Paul Dareau
a3c09ee8e9
clientv3/doc: Improve error handling comment
2018-08-23 19:47:27 +02:00
Louis-Paul Dareau
2ee4525cd2
clientv3/doc: Update error handling godoc
...
0c5bcd5d80
updated error handling for
`ErrEmptyKey` but missed the godoc.
2018-08-23 13:37:39 +02:00
Derrick J. Wippler
eb9c8d3c2f
clientv3: return reason to user when server cancels watch
...
This change allows Watch users to retrieve the cancel reason when a
watch is canceled by the server. Additionally WatchResponses with
closeErr set now have Canceled set true which is in line with the
documentation for the Canceled field.
2018-08-16 23:11:02 -05:00
Gyuho Lee
aeb418b815
clientv3/integration: remove "transport.ErrConnClosing" match
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-08-09 19:27:37 -07:00
Daniel Lipovetsky
ddde272fb0
clientv3: Make saved snapshot readable by user only
...
Fixes #9976
2018-08-08 12:46:17 -07:00
Joe Betz
1c382a4868
Merge pull request #9945 from jpbetz/balancer-maintanance-api-fix
...
clientv3: Fix maintenance APIs to directly dial grpc endpoints directly
2018-07-27 10:15:25 -07:00
Joe Betz
67bcf28c4e
clientv3: Use passthrough resolver for direct endpoint dialing
2018-07-27 10:15:02 -07:00
Joe Betz
a2ecd6b676
clientv3: Simplify TestDialTLSNoConfig now that dial with grpc.WithBlock correctly results in a client timeout error
2018-07-24 10:45:03 -07:00
Joe Betz
750b87d622
Merge pull request #9924 from jpbetz/persist-lease-deadline
...
lease: Persist remainingTTL to prevent indefinite auto-renewal of long lived leases
2018-07-24 09:39:57 -07:00
Joe Betz
b3b06a862a
clientv3: Fix maintenance APIs to directly dial grpc endpoints correctly.
2018-07-23 11:20:15 -07:00
Gyuho Lee
0458c5d54b
Merge pull request #9951 from gyuho/revive
...
*: integrate https://github.com/mgechev/revive with fmt tests
2018-07-23 06:39:33 -07:00
Gyuho Lee
e93fb56037
clientv3: clean up variables, add response dropping warning
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-07-22 17:59:38 -07:00
Gyuho Lee
f3385418bb
clientv3: fix keepalive send interval when response queue is full
...
client should update next keepalive send time
even when lease keepalive response queue becomes full.
Otherwise, client sends keepalive request every 500ms
regardless of TTL when the send is only expected to happen
with the interval of TTL / 3 at minimum.
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-07-22 17:59:32 -07:00
Gyuho Lee
90a5da18cf
clientv3: clean up code format
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-07-21 16:03:12 -07:00
Joe Betz
bbe2d777b1
lease: Add LessorConfig and wire zap logger into Lessor
2018-07-17 13:10:34 -07:00
Gyuho Lee
dbccfe06fb
clientv3/balancer: debugging balancer test failures
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-07-05 12:18:13 -07:00
Gyuho Lee
7e542078bc
clientv3/balancer: skip "TestRoundRobinBalancedResolvableFailoverFromServerFail" for now
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-07-05 11:57:45 -07:00
Joe Betz
4b51b6de49
*: Add progress notify request watch request
2018-06-27 16:46:13 -07:00
Gyuho Lee
11ead62b9d
clientv3: clarify "WithRequireLeader" for network partition
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-06-20 10:28:41 -07:00
Gyuho Lee
6d15396bc7
clientv3: add link to architecture docs
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-06-18 13:51:20 -07:00
Joe Betz
8451a1715f
clientv3: Enable balancer logging if ETCD_CLIENT_DEBUG environment variable is set
2018-06-15 16:28:36 -07:00
Gyuho Lee
6e521d2f3f
clientv3: add "IsConnCanceled", deprecate "grpc.ErrClientConnClosing"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-06-15 14:47:08 -07:00
Gyuho Lee
a76681073d
clientv3: add "zap.Config" to replace global logger
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-06-15 13:41:28 -07:00
Gyuho Lee
08da08bb19
clientv3: clarify retry function names, do not retry on dial error
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-06-15 13:41:28 -07:00
Gyuho Lee
dd520cebd4
clientv3: put "defaultCallOpts" back to "Client" object
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-06-15 13:41:28 -07:00
Gyuho Lee
a3032d3d0b
*: fix fmt tests, reenable "testEmbedEtcdGracefulStop"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-06-15 13:41:28 -07:00
Joe Betz
3b84117f54
clientv3/integration: Add err check to TestDialTLSNoConfig to prevent nil pointer dereference on c.Close()
2018-06-15 13:41:28 -07:00
Joe Betz
55ef9cc1d0
clientv3: Add auth retry to retry interceptor
2018-06-15 13:41:28 -07:00
Joe Betz
a5b2fb5563
clientv3: Introduce custom retry interceptor based on go-grpc-middleware/retry
2018-06-15 13:41:28 -07:00
Gyuho Lee
4065735845
clientv3: remove unused "dialerrc"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-06-15 13:41:28 -07:00
Joe Betz
1f6548b751
clientv3: Stop expecting retry in integration tests with new grpc balancer
2018-06-15 13:41:28 -07:00
Joe Betz
8569b9c782
clientv3: Fix endpoint resolver to create a new resolver for each grpc client connection
2018-06-15 13:41:28 -07:00
Joe Betz
9304d1abd1
clientv3: Fix TLS test failures by returning DeadlineExceeded error from dial without any additional wrapping
2018-06-15 13:41:28 -07:00
Joe Betz
ee2747eba8
clientv3: Fix dial calls to consistently use endpoint resolver, attempt to deflake alarm test
2018-06-15 13:41:28 -07:00
Joe Betz
f84f554301
clientv3: Fix auth client to use endpoints instead of host when dialing, fix tests to block on dial when required.
2018-06-15 13:41:28 -07:00
Joe Betz
66e65cd660
clientv3: Avoid timeouts in ordering test
2018-06-15 13:41:28 -07:00
Gyuho Lee
bb032f3e5f
clientv3: deprecate "grpc.WithTimeout" in favor of "grpc.DialContext"
...
"grpc.WithTimeout" dial option is being deprecated.
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-06-15 13:41:28 -07:00
Gyuho Lee
994a569f53
clientv3: pass "grpc.WithBlock" on "TestDialTimeout"
...
Otherwise, grpc.DialContext would just return before
connection is up.
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-06-15 13:41:28 -07:00
Gyuho Lee
037d7b4abe
clientv3: dial with context when creating authenticator
...
Otherwise, "grpc.Dial" blocks when "grpc.WithTimeout" dial
option gets deprecated.
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-06-15 13:41:28 -07:00
Joe Betz
7ac2a2dd20
clientv3: Fix dialer for new balancer to correctly handle first are as endpoint, not hostname
2018-06-15 13:41:28 -07:00
Joe Betz
309208dbef
clientv3: Split out grpc balancer builder to ensure there is a balancer per ClientConn
2018-06-15 13:41:28 -07:00
Joe Betz
f20a1173d8
clientv3: Fix new load balancer integration issues
2018-06-15 13:41:28 -07:00
Joe Betz
6080fa1270
clientv3: Integrate new grpc load balancer interface with etcd client
2018-06-15 13:41:28 -07:00
Joe Betz
ed6bc2b554
clientv3: add load balancer unix socket test
2018-06-15 13:41:28 -07:00
Joe Betz
4d2a25b056
clientv3/balancer: add endpoints resolver
2018-06-15 13:41:28 -07:00
Gyuho Lee
9867210a54
clientv3/balancer: add "TestRoundRobinBalancedPassthrough" (WIP)
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-06-15 13:41:28 -07:00
Gyuho Lee
370761de82
clientv3/balancer: add more failover tests with resolver
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-06-15 13:41:28 -07:00
Gyuho Lee
7c92185fe3
clientv3/balancer: use new mock server in tests
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-06-15 13:41:28 -07:00
Joe Betz
657c2e15cc
*: introduce mock server for testing load balancing and add a simple happy-path load balancer test
...
Author: Joe Betz <jpbetz@google.com>
Date: Wed Mar 28 15:51:33 2018 -0700
2018-06-15 13:41:28 -07:00
Gyuho Lee
7fe4a08fdc
clientv3/balancer: initial commit
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-06-15 13:41:28 -07:00
Jordan Liggitt
d1579c95a2
clientv3: backoff on reestablishing watches when Unavailable errors are encountered
2018-06-13 02:05:04 -04:00
Gyuho Lee
7284e5a0a9
clientv3/integration: fix "TestMaintenanceSnapshotErrorInflight"
...
Errors from gRPC should be typed *status.statusError
=== RUN TestMaintenanceSnapshotErrorInflight
WARNING: 2018/05/29 11:43:21 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial unix localhost:55815860381826373260: connect: no such file or directory"; Reconnecting to {localhost:55815860381826373260 0 <nil>}
--- FAIL: TestMaintenanceSnapshotErrorInflight (2.42s)
maintenance_test.go:192: expected context deadline exceeded, got rpc error: code = DeadlineExceeded desc = context deadline exceeded
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-29 11:49:18 -07:00
Gyuho Lee
9149565cb3
*: move to "etcdserver/api/membership"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-21 10:31:16 -07:00
Gyuho Lee
143fbf4caa
clientv3/snapshot: rename snapshot package
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-21 07:45:34 -07:00
Gyuho Lee
19eb8a5132
clientv3/integration: do not run fragmentation tests with gRPC Proxy
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-18 10:45:03 -07:00
Gyuho Lee
56ec416eba
clientv3/integration: test watch response fragmentation
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-14 13:34:54 -07:00