Commit Graph

923 Commits (50babc16e7e0acea10b38f64f5c5f9811ba82c76)

Author SHA1 Message Date
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
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
Hitoshi Mitake b0ed5c1dd8
Merge pull request #8680 from mitake/auth-cleanup
*: don't use a string literal directly in grpc metadata
2018-03-20 18:19:23 +09:00
Gyuho Lee 3aa5711dca clientv3: move health balancer to "balancer"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-19 15:16:11 -07:00
Hitoshi Mitake b1dd19a7aa *: don't use string literals directly in grpc metadata
Current etcd code uses the string literals ("token", "authorization")
as field names of grpc and swappger metadata for passing token. It is
difficult to maintain so this commit introduces new constants for the
purpose.
2018-03-15 14:17:34 +09:00
Hitoshi Mitake 752963beea *: unify type of key and rangeEnd in AuthRoleRevokePermissionRequest
Fix https://github.com/coreos/etcd/issues/9424
2018-03-14 14:38:20 +09:00
Gyuho Lee e280f8c3da clientv3/integration: adjust timeouts for TestLeasingReconnectOwnerRevoke
Now Restart takes longer, and leasing Get blocks
on server restarts anyway, so fix CI failures in
slow machines.

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-08 10:58:18 -08:00
Gyuho Lee 3e69dc5a7c clientv3/integration: test "rpctypes.ErrLeaseTTLTooLarge"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-08 10:19:30 -08:00
Iwasaki Yudai db21941d1d *: enforce max lease TTL with 9,000,000,000 seconds
math.MaxInt64 / time.Second is 9,223,372,036. 9,000,000,000 is easier to
remember/document.
2018-03-08 10:17:12 -08:00
Gyuho Lee 4e0c00244d *: remove "pkg/logger", replace with "pkg/logutil"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-07 10:49:25 -08:00
Gyuho Lee 8a518b01c4 *: revert "internal/mvcc" change
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-26 17:11:40 -08:00
Gyuho Lee dd2f3b0de8 *: revert "internal/lease" change
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-26 17:11:40 -08:00
Gyuho Lee bb95d190c1 *: revert "internal/auth" change
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-26 17:11:40 -08:00
Gyuho Lee 9c9d846959 clientv3util: fix govet warning
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-26 10:05:24 -08:00
Gyuho Lee 1f016f3b96 clientv3: use "pkg/logger"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-05 13:40:58 -08:00
Hitoshi Mitake 6c91766490 *: move "auth" to "internal/auth" 2018-01-29 14:57:35 +09:00
Gyuho Lee 80d15948bc *: move "mvcc" to "internal/mvcc"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-26 11:14:41 -08:00
Gyuho Lee 349a377a67 *: move "lease" to "internal/lease"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-26 11:09:29 -08:00
Manjunath A Kumatagi 1f638c4ad8 clientv3: Fix govet errors 2018-01-25 04:48:47 -05:00
Gyuho Lee 97cd2a41c8 client,clientv3: remove "cmd/vendor" in README.md
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-24 15:26:17 -08:00
ka1em c143545d13
clientv3/namespace: fixed an error in the doc.go 2018-01-24 23:36:58 +08:00
Gyuho Lee c837e01c7f clientv3/integration: add TestMemberAddUpdateWrongURLs
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-22 11:24:15 -08:00
Gyuho Lee a2e999fa4c clientv3: prevent no-scheme URLs to cluster APIs
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-22 11:11:59 -08:00
Gyuho Lee f98b1bc725 clientv3: document client-side request size limit
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-18 12:44:01 -08:00
Sahdev Zala e16abdfade
Merge pull request #9115 from gyuho/doc-watch
clientv3: document possible memory pile-up in Watch
2018-01-11 18:12:13 -05:00
Sahdev P. Zala 3b7e2ce0ca StatusFromError: handle return value of the function
status.FromError can return nil, false. We are handling the return values
most places in code but some places we aren't. Fixing it herewith.

Fixes #9117
2018-01-08 22:28:20 -05:00
Gyuho Lee 31c2d4b0a2 clientv3: document possible memory pile-up in Watch
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-08 10:37:47 -08:00
Gyuho Lee 65464838ba
Merge pull request #9065 from gyuho/watch-id-2
*: allow user-provided watch ID to mvcc
2018-01-05 15:08:10 -08:00
Gyuho Lee 7b4fc2601c clientv3/integration: fix typos
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-03 17:26:43 -08:00
Sam Batschelet d21fef2d41 integration: add constant RequestWaitTimeout. 2018-01-03 15:53:57 -05:00
Gyuho Lee 806ff6dff9 clientv3/integration: fix TestKVLargeRequests with -tags cluster_proxy
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-02 10:50:29 -08:00
Gyuho Lee 10522f88f5 clientv3: handle non -1 watch ID on cancellation
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-31 17:43:28 -08:00
Gyuho Lee 1880cf8da2 clientv3/leasing: fix racey waitSession
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-21 16:03:35 -08:00
Gyuho Lee be40d27070
Merge pull request #9016 from gyuho/watch-doc
clientv3: document context to "Watch" API
2017-12-21 13:02:20 -08:00
Gyuho Lee f6f3a9ca69 clientv3: document context to "Watch" API
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-21 12:59:15 -08:00
Gyuho Lee 096c947159
Merge pull request #9024 from gyuho/snapshot-doc
clientv3: document context to "Snapshot" API
2017-12-21 12:44:40 -08:00
Gyu-Ho Lee 255476b5e5 clientv3/retry: clean up retryRPCFunc
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-12-20 12:30:33 -08:00
Gyuho Lee 88fe8de99b clientv3/integration: fix TestKVPutError
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-20 10:58:05 -08:00
Gyuho Lee f38593bbad clientv3/integration: test large KV requests
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-20 10:58:05 -08:00
Gyuho Lee 497412c588 clientv3: call other APIs with default gRPC call options
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-20 10:58:05 -08:00
Gyuho Lee f87760998b clientv3: call KV/Txn APIs with default gRPC call options
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-20 10:58:05 -08:00
Gyuho Lee 63d66b1011 clientv3: configure gRPC message limits in Config
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-20 10:58:01 -08:00
Gyuho Lee b0a7623be8
Merge pull request #9023 from gyuho/keepalive-doc
clientv3: document context to "KeepAlive" API
2017-12-19 11:53:56 -08:00
Gyuho Lee 7cd985bdac clientv3: translate Snapshot API gRPC status error
To be consistent with other APIs.

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-19 10:46:19 -08:00
Gyuho Lee e833b7c2d8 clientv3: document context to "Snapshot" API
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-18 17:03:18 -08:00
Gyuho Lee 3e58dd707f clientv3: document lease KeepAlive streaming errors
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-18 10:19:41 -08:00
Anthony Romano da3e3b7240 clientv3: document from "don't halt lease client if there is a lease error"
From https://github.com/coreos/etcd/pull/7866.
2017-12-18 09:55:00 -08:00
Sam Batschelet a5d9bff24c clientv3/lease.go: TTL, document expired Lease. 2017-12-18 08:34:19 -05:00
Manjunath A Kumatagi 18746c65da Clientv3: Fix govet error for gotip 2017-12-15 14:31:27 +05:30
Gyu-Ho Lee 805bcc828c clientv3: simplify V(4) logger with Lvl(4)
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-12-05 18:48:36 -08:00
Gyu-Ho Lee 5d2461e139 clientv3: add Lvl method to logger
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-12-05 18:48:36 -08:00
Gyuho Lee 3a941c9455 clientv3/config.go: remove extra whitespace character
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-05 14:51:36 -08:00
Gyuho Lee 6458e22708 clientv3: fix indentation in doc.go
Looks off in https://godoc.org/github.com/coreos/etcd/clientv3.

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-04 17:05:31 -08:00
Gyu-Ho Lee 6b6013fad5 clientv3/doc: update dial-timeout error handling with new gRPC
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-12-04 13:45:42 -08:00
Rene Zbinden e18afc462b clientv3: Fix comment for DialKeepAliveTime and DialKeepAliveTimeout 2017-12-04 14:22:34 +01:00
Gyuho Lee 56a012f2ab
Merge pull request #8841 from gyuho/test-test
clientv3/integration: add more tests on balancer switch, inflight range
2017-11-30 09:38:53 -08:00
Gyu-Ho Lee 92167e8773 clientv3: update error handling godoc
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-29 10:53:54 -08:00
Gyu-Ho Lee a7cb307a18 clientv3/integration: add more tests on balancer switch, inflight range
Test all possible cases of server shutdown with inflight range requests.
Removed redundant tests in kv_test.go.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-27 15:05:12 -08:00
Gyu-Ho Lee bd76ac85db clientv3/integration: move isServerCtxTimeout to server_shutdown_test.go
Tests with cluster_proxy tags were failing, since isServerCtxTimeout
was defined with "+build !cluster_proxy".

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-27 15:02:48 -08:00
Gyu-Ho Lee a9105b5a8d clientv3: document context timeout error with server-side clock skew
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-27 14:06:42 -08:00
Gyu-Ho Lee 0d0e8e78f7 clientv3/integration: handle server-side context timeouts from clock-drift
Due to clock drifts in server-side, client context times out
first in server-side, while original client-side context is
not timed out yet.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-27 14:02:09 -08:00
Gyu-Ho Lee 5a154e8e2b *: disable gRPC client logs in tests
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-11 20:56:00 -08:00
Gyu-Ho Lee 977f33a5a6 clientv3: grpclog.SetLoggerV2 on clientv3.SetLogger
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-11 20:51:45 -08:00
Gyu-Ho Lee 75110dd839 *: fix naked returns
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-10 18:46:15 -08:00
Gyu-Ho Lee c669ff9765 clientv3: retry mutable ops on "no connection available"
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-10 15:40:06 -08:00
Gyu-Ho Lee 123b869a0f clientv3/integration: match grpc.ErrClientConnClosing in TestKVNewAfterClose
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-10 15:39:35 -08:00
Gyu-Ho Lee 103efd922b clientv3/balancer: only notify healthy addresses
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-10 15:39:25 -08:00
Gyu-Ho Lee 012b013538 clientv3: combine "healthBalancer" and "simpleBalancer"
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-10 15:38:05 -08:00
Gyu-Ho Lee 52f4bc9061 clientv3/integration: remove TestKVGetOneEndpointDown
Already tested in other server shutdown tests.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-10 14:46:40 -08:00
Gyu-Ho Lee dfe0f8c2bc
Merge pull request #8839 from gyuho/test-balancer
clientv3/integration: test linearizable get with leader election, network partition
2017-11-10 13:55:11 -08:00
Gyu-Ho Lee 00b15e38df words: whitelist prometheus
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-10 10:08:48 -08:00
tylerauerbeck 973857107e clientv3: update metrics to use promhttp
Update clientv3/example_metrics_test.go and clientv3/integration/metrics_test.go to use promhttp.Handler() instead of prometheus.Handler()

fixes #8729
2017-11-10 09:47:49 -08:00
Gyu-Ho Lee 706cf20339 clientv3/integration: test linearizable get with leader election, network partition
Test case that failed my balancer refactor https://github.com/coreos/etcd/pull/8834.
Current, kv network partition tests do not specifically test
isolated leader case.

This PR moves TestKVSwitchUnavailable to network_partition_test.go
and make it always isolate leader.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-07 19:51:24 -08:00
Gyu-Ho Lee f49f5c9094 *: disable grpc client log in tests by default
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-07 15:05:13 -08:00
Gyu-Ho Lee 5d98710b2e api/v3rpc: deprecate grpc.Errorf
It's been deprecated as of grpc/grpc-go v1.6.x.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-04 22:08:17 -07:00
Gyu-Ho Lee 0ca8f420d4 clientv3/integration: match more errors in put retries
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-31 13:31:38 -07:00
Gyu-Ho Lee 2c13231e7b clientv3/integration: increase balancer switch timeout for TestKVGetResetLoneEndpoint
Since 3-second is the minimum time to keep an endpoint in unhealthy,
it is possible that endpoint switch happens right after context timeout.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-31 10:48:15 -07:00
Gyu-Ho Lee 8d23e1c870 clientv3/integration: add blackhole tests for range RPCs
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-30 19:18:53 -07:00
Gyu-Ho Lee a37dd0055f clientv3/integration: move to TestBalancerUnderBlackholeKeepAliveWatch
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-30 17:19:48 -07:00
Gyu-Ho Lee 8d5c284b6c clientv3/integration: add blackhole tests on mutable operations
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-30 13:32:59 -07:00
Gyu-Ho Lee bea930f44d clientv3/integration: finish isolated node test cases
1. one with retry
2. one without retry (range request with longer timeouts)

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-30 11:17:43 -07:00
Gyu-Ho Lee ca1e6a74e0
Merge pull request #8782 from gyuho/rename
clientv3/integration: rename to 'mustWaitPinReady'
2017-10-27 15:07:31 -07:00
Gyu-Ho Lee 5d169b866f clientv3/integration: rename to 'mustWaitPinReady'
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-27 15:00:31 -07:00
Gyu-Ho Lee 03ce2fa037 clientv3/integration: remove client keepalive in network partition tests
Those tests are about balancer endpoint switch, not about keepalive pings.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-27 14:47:37 -07:00
Xiang Li 2cea13ba68
Merge pull request #8779 from gyuho/shutdown-test
clientv3/integration: add TestBalancerUnderServerShutdownImmutable
2017-10-27 12:23:22 -07:00
Gyu-Ho Lee 732c40531b
Merge pull request #8762 from gyuho/partition-test
clientv3/integration: add TestBalancerUnderNetworkPartitionWatch
2017-10-27 12:22:32 -07:00
Gyu-Ho Lee 62821158aa
Merge pull request #8767 from xiang90/f
clientv3/integration: fix a todo in testNetworkPartitionBalancer
2017-10-27 11:26:40 -07:00
Gyu-Ho Lee 9d95cfb105 clientv3/integration: add TestBalancerUnderServerShutdownImmutable
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-27 10:55:12 -07:00
Gyu-Ho Lee e980bde82d clientv3/integration: add TestBalancerUnderNetworkPartitionWatch
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-26 18:17:00 -07:00
Gyu-Ho Lee 0bfc6a0d92 clientv3/integration: add TestBalancerUnderServerShutdownMutable*
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-26 16:42:33 -07:00
Gyu-Ho Lee 6a8d6b6ad9 clientv3/integration: use waitPinReady in blackhole test
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-26 15:12:27 -07:00
Gyu-Ho Lee af53f54042 clientv3/integration: add waitPinReady
RPC should be sent to trigger 'readyWait' on new pin address.
Otherwise, endpoints other than ep[0] may be pinned.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-26 15:11:10 -07:00
Xiang 10c971db70 clientv3/integration: add put blackhole test 2017-10-26 14:09:51 -07:00
Xiang 7d7e9b6e43 clientv3/integration: fix a todo in testNetworkPartitionBalancer 2017-10-25 22:54:44 -07:00
Gyu-Ho Lee 8fa35216b0 clientv3/integration: Get with context timeout
Address https://github.com/coreos/etcd/pull/8762#discussion_r147019068.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-25 17:43:29 -07:00
Xiang Li 995d79a0fc Merge pull request #8758 from gyuho/failure-test
clientv3/integration: add TestBalancerUnderServerShutdownWatch
2017-10-25 17:03:33 -07:00
Gyu-Ho Lee cea7387b73 clientv3/integration: add TestBalancerUnderServerShutdownWatch
Current Watch integration tests haven't covered the balancer
switch behavior under server failures.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-25 16:13:46 -07:00
Gyu-Ho Lee c50cfbeaf6 Merge pull request #8759 from gyuho/mmm
integration: use variadic parameters for *Partition
2017-10-25 15:31:33 -07:00