Gyuho Lee
16487395e1
test: simplify CI tests
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-12 19:05:34 -07:00
Anthony Romano
78141fae60
clientv3: set current revision to create rev regardless of CreateNotify
...
Turns out the optimization to ignore setting the init rev for
current revision watches breaks some ordering assumptions. Since
Watch only returns a channel once it gets a response, it should
bind the revision at the time of the first create response.
Was causing TestWatchReconnInit to fail.
2017-04-25 10:54:39 -07:00
Anthony Romano
7c896098d2
clientv3/integration: test watch resume with disconnect before first event
2017-04-25 10:53:58 -07:00
Anthony Romano
30f4e36de4
clientv3: only update initReq.rev == 0 with creation watch revision
...
Always updating the initReq.rev on watch create will resume from the wrong
revision if initReq is ever nonzero.
2017-04-25 10:53:37 -07:00
Gyu-Ho Lee
38f79fa565
clientv3: fix gofmt warnings
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-04-13 14:44:22 -07:00
Anthony Romano
8cb5b48f58
clientv3: test dial timeout is respected when using auth
2017-04-04 14:14:23 -07:00
Anthony Romano
6538217528
clientv3: respect dial timeout when authenticating
...
Fixes #7627
2017-04-04 14:12:32 -07:00
Anthony Romano
b44c6bff9d
clientv3: use waitgroup to wait for substream goroutine teardown
...
When a grpc watch stream is torn down, it will join on its logical substream
goroutines by waiting for each to close a channel. This doesn't guarantee
the substream is fully exited, though, but only about to exit and can be
waiting to resume even after Watch.Close finishes. Instead, use a
waitgroup.Done at the very end of the substream defer.
Fixes #7573
2017-03-23 12:26:32 -07:00
Anthony Romano
4a1bffdbc6
clientv3: close open watch channel if substream is closing on reconnect
...
If substream is closing but outc is still open while reconnecting, then outc
would only be closed once the watch client would connect or once the watch
client is closed. This was leading to deadlocks in the proxy tests. Instead,
close immediately if the context is canceled.
Fixes #7503
2017-03-18 07:56:18 -07:00
Anthony Romano
114e293119
integration: test keepalives for short TTLs
2017-02-22 10:38:38 -08:00
Anthony Romano
1439955536
clientv3: do not set next keepalive time <= now+TTL
2017-02-22 10:38:28 -08:00
Xiang
ff7fa9843d
clientv3: fix lease keepalive duration
2017-02-16 13:52:27 -08:00
Xiang
f66138d403
clientv3: fix lease keepalive duration
2017-02-16 12:41:09 -08:00
Anthony Romano
eaa8b9e155
clientv3: test closing client cancels blocking dials
2017-02-14 11:31:51 -08:00
Anthony Romano
ea2aae464d
clientv3: use DialContext
...
Fixes #7216
2017-02-14 11:31:43 -08:00
Derek Chiang
5676226867
clientv3/concurrency: fix rev comparison on concurrent key deletion
2017-01-20 09:56:36 -08:00
Anthony Romano
7dfe503f1c
Merge pull request #7148 from heyitsanthony/fix-lease-overlap
...
clientv3: don't reset stream on keepaliveonce or revoke failure
2017-01-13 10:05:02 -08:00
Anthony Romano
5e3b20e70c
clientv3: don't reset stream on keepaliveonce or revoke failure
...
Would cause the keepalive loop to cancel out.
Fixes #7082
2017-01-13 09:05:23 -08:00
Hitoshi Mitake
c89eae790d
Merge pull request #7110 from mitake/reauth
...
etcdserver, clientv3: handle a case of expired auth token
2017-01-13 11:57:25 +09:00
fanmin shi
6d443ba3f9
clienv3: fix balancer test logic
2017-01-12 13:07:44 -08:00
Hitoshi Mitake
d431b64d97
etcdserver, clientv3: handle a case of expired auth token
...
This commit adds a mechanism of handling a case of expired auth token
to clientv3. If a server returns an error code
grpc.codes.Unauthenticated, newRetryWrapper() tries to get a new token
and use it as an option of PerRPCCredential.
Fixes https://github.com/coreos/etcd/issues/7012
2017-01-12 11:49:02 +09:00
Anthony Romano
a375e91c66
clientv3: don't reset keepalive stream on grant failure
...
Was triggering cancelation errors on outstanding KeepAlives if Grant
had to retry.
2016-12-16 10:36:51 -08:00
Anthony Romano
46bd842db9
clientv3/integration: test lease grant/keepalive with/without failures
2016-12-16 10:36:51 -08:00
Xiang Li
86a43849fb
Merge pull request #7010 from dennwc/keepalive-exit-err
...
clientv3: ensure KeepAlive channel is closed or error is returned
2016-12-15 08:06:36 -08:00
Denys Smirnov
b126e31132
clientv3: better error message for keep alive loop halt
2016-12-15 16:06:27 +02:00
Denys Smirnov
5183ce0118
clientv3: add test for keep alive loop exit case
2016-12-15 03:02:44 +02:00
Denys Smirnov
e0bcd4d516
clientv3: return error from KeepAlive if corresponding loop exits
...
after recvKeepAliveLoop exits client might call KeepAlive adding request channel that will not be closed
this fix makes sure that recvKeepAliveLoop is running before adding request to lessor's list and returns error otherwise
Fixes #6922
2016-12-15 03:02:35 +02:00
Anthony Romano
246fb29d8a
clientv3: close Lease on client Close
...
Fixes #6987
2016-12-14 12:11:17 -08:00
Anthony Romano
fdd89df1eb
clientv3/integration: test lease keepalive works following quorum loss
2016-12-06 14:09:57 -08:00
Gyu-Ho Lee
a08103c088
clientv3: return copy of endpoints, not pointer
...
Fix https://github.com/coreos/etcd/issues/6892 .
2016-11-23 11:33:54 -08:00
fanmin shi
ab6b175a2a
Merge pull request #6828 from fanminshi/add_not_equal_to_compare
...
etcdserver, clientv3: add "!=" to txn
2016-11-09 15:27:08 -08:00
fanmin shi
c2fd42b556
etcdserver, clientv3: add "!=" to txn
...
adding != to compare is a requested functionality from a etcd user
FIX #6719
2016-11-09 14:28:36 -08:00
Kelvin Liang
c20d31adc5
clientv3/naming: support OpOption when adding an endpoint
...
if we want to add an endpoint with lease, we need this option.
for example:
resp, err := cli.Grant(context.TODO(), 5)
if err != nil {
log.Fatal(err)
}
err = r.Update(context.TODO(), serviceName, naming.Update{Op:naming.Add, Addr: exposedAddr}, clientv3.WithLease(resp.ID))
if err != nil {
log.Fatalf(err)
}
2016-11-09 15:30:17 -04:00
Gyu-Ho Lee
dbb692e50f
Merge pull request #6820 from gyuho/watcher
...
mvcc: return -1 for wrong watcher range key >= end
2016-11-08 17:36:19 -08:00
Gyu-Ho Lee
9dd75a946f
clientv3, ctlv3: document range end requirement
2016-11-08 17:02:32 -08:00
Gyu-Ho Lee
a93d8dfe62
Merge pull request #6821 from gyuho/manual
...
*: fix minor typos, styles
2016-11-08 15:39:26 -08:00
Gyu-Ho Lee
2955d58776
clientv3/integration: fix minor typos, consistent formatting
2016-11-08 12:37:33 -08:00
Anthony Romano
1aeeb38459
clientv3: let watchers cancel when reconnecting
2016-11-08 12:02:17 -08:00
Anthony Romano
7b5e5eadb1
integration: test canceling a watcher on disconnected stream
2016-11-08 12:02:17 -08:00
Anthony Romano
fe755b6250
Merge pull request #6748 from sinsharat/client_metric_add_tests
...
clientv3: added test for client metrics
2016-11-02 15:00:08 -07:00
sharat
195570b621
clientv3: updated doc for metric support
2016-11-03 03:22:59 +05:30
sinsharat
13acad85b3
clientv3: added test for client metrics
2016-11-03 00:38:29 +05:30
Gyu-Ho Lee
0684d8c4c6
clientv3/integration: close active connection to get ErrClientConnClosing
...
because clientv3.Close won't trigger it any more
clientv3.Close just closes watch client
instead of closing grpc connection
2016-11-01 11:13:33 -07:00
Gyu-Ho Lee
5bd00ab1f6
*: fix minor typos
2016-10-31 09:47:15 -07:00
Anthony Romano
0345226759
Merge pull request #6751 from heyitsanthony/fix-require-leader-test
...
integration: put key on watch target member for TestWatchWithRequireLeader
2016-10-28 23:24:00 -04:00
Anthony Romano
d8ea9d22b6
integration: put key on watch target member for TestWatchWithRequireLeader
...
It's possible the put will not propagate to all members before removing quorum,
causing watches on the key to wait forever.
Fixes #6386
2016-10-28 13:12:26 -04:00
sharat
a1bfb31219
clientv3: added example for client metrics
2016-10-28 04:30:17 +05:30
Xiang Li
89107a49fa
Merge pull request #6741 from sinsharat/clientv3_add_client_side_metrics
...
clientv3: added client side metrics support
2016-10-27 13:22:10 -07:00
Gyu-Ho Lee
0a3d45a307
clientv3: send create event over outc
2016-10-27 11:11:16 -07:00
sharat
8fd1dd7862
clientv3: added client side metrics support
2016-10-27 22:47:45 +05:30