Commit Graph

819 Commits (3e1d635dbe325f74176b5fcc06c2db896d2cde04)

Author SHA1 Message Date
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
Gyuho Lee d2c8408216 clientv3: support watch events fragmentation
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-14 13:34:50 -07:00
Gyuho Lee 63dc4429f0 clientv3: add "WithFragment" OpOption
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-14 13:02:27 -07:00
Gyuho Lee 1eed8493c8 clientv3: add godoc on op.go
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-14 12:53:54 -07:00
Jiang Xuan bf432648ae *: make bcrypt-cost configurable 2018-05-03 11:43:32 -07:00
Gyuho Lee f6a14fb72c clientv3: use "zap" logger in integration tests
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-01 16:15:09 -07:00
Gyuho Lee 6dbce6b9a4 clientv3,etcdctl: support structured logger
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-16 17:36:00 -07:00
Gyuho Lee 3a7b5c1b2b clientv3/integration: log test failures from slow balancer as TODO
Balancer tests have been flaky since last balancer rewrite.
Should be from slow balancer failover. Once we re-rewrite balancer
with roundrobin, there should be no more flaky tests as below:

TestBalancerUnderServerStopInflightLinearizableGetOnRestart (27.62s)
server_shutdown_test.go:343: context deadline exceeded

TestBalancerUnderServerShutdownDelete (3.22s)
util.go:32: context deadline exceeded

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-10 13:47:07 -07:00
Gyuho Lee a60bb6104c *: regenerate "fixtures-expired"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-09 10:59:52 -07:00
jiaxuanzhou ad448fb280 clientv3: keep NewFromURL the same, add method NewFromURLs 2018-03-27 10:40:10 +08:00
jiaxuanzhou e1bf612ee8 clientv3: optimize func NewFromURL 2018-03-27 09:30:12 +08:00
Gyuho Lee ad8c326599 clientv3/yaml: deprecate CAFile field
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-20 15:38:08 -07:00