101 Commits

Author SHA1 Message Date
Joe Betz
66e65cd660 clientv3: Avoid timeouts in ordering test 2018-06-15 13:41:28 -07:00
Gyuho Lee
a52f16d4a6 integration: test lease revoke routine with JWT token
https://github.com/coreos/etcd/pull/9698 wasn't really testing
the panic code path when leases are expiry.

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-24 11:38:31 -07:00
Gyuho Lee
7940113906 *: move internal "etcdserver/api/rafthttp"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-21 10:31:16 -07:00
Gyuho Lee
aa99ed54b7 integration: rename "SnapshotCount"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-18 14:41:30 -07:00
Gyuho Lee
b7443ad849 integration: remove unused parameters
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-09 15:42:45 -07:00
Jiang Xuan
bf432648ae *: make bcrypt-cost configurable 2018-05-03 11:43:32 -07:00
Gyuho Lee
1d18f45caf integration: silence http server logs
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-02 12:58:56 -07:00
Gyuho Lee
58b7ab97eb integration: use structured logging in peer handler
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-02 12:53:56 -07:00
Gyuho Lee
d2e1484762 integration: support structured logging in "v2http"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-02 11:57:23 -07:00
Gyuho Lee
21d75570ee integration: use "zap" logger
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-01 16:15:09 -07:00
Gyuho Lee
3fe9030d34 integration: set InitialElectionTickAdvance to true by default
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-19 17:45:23 -07:00
Gyuho Lee
68802b333b integration: re-overwrite "httptest.Server" TLS.Certificates
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-13 14:19:34 -07:00
Gyuho Lee
b705f6f8f2 Revert "integration: fix httptest TLS server start"
This reverts commit 3d3ba8b9cb182e958d8d0c26ac13fff899424fc9.
2018-04-13 13:06:09 -07:00
Gyuho Lee
6ab9776601 integration: add "TestTLSReloadCopyIPOnly"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-13 13:02:45 -07:00
Gyuho Lee
233af4b4ec integration: add IP only TLSInfos
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-13 12:03:55 -07:00
Gyuho Lee
3d3ba8b9cb integration: fix httptest TLS server start
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-13 11:16:54 -07:00
Gyuho Lee
2d13894a16 integration: fix "fixtures-expired" path
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-09 11:49:42 -07:00
Gyuho Lee
a60bb6104c *: regenerate "fixtures-expired"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-09 10:59:52 -07:00
Sam Batschelet
d21fef2d41 integration: add constant RequestWaitTimeout. 2018-01-03 15:53:57 -05:00
Gyuho Lee
3d56045da0 integration: bump up wait leader timeout for slow CIs
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
Xiang
1c69cc5657 integration: always enable initial corruption check 2017-11-26 16:51:04 -08:00
Gyu-Ho Lee
a41f3b64aa integration: expose ElectionTimeout, multiply ticks to timeout
To be consistent with etcdserver

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-30 09:22:40 -07:00
Gyu-Ho Lee
b6f770fc24 integration: use variadic parameters for *Partition
'member' type is not exported.
In network partition tests, we want do

InjectPartition(t, clus.Members[lead], clus.Members[lead+1])

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-25 14:55:03 -07:00
Gyu-Ho Lee
ff2ed93b5c clientv3/integration: do not create v3 clients when not used
Add 'SkipCreatingClients' field to skip creating clients if not used.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-24 16:59:41 -07:00
Gyu-Ho Lee
bc5b7c0937 integration: enable client debug logging on EXPECT_DEBUG
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-29 12:19:59 -07:00
Gyu-Ho Lee
044aca7f50 integration: configure keepalive parameters for server
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-28 15:34:39 -07:00
Gyu-Ho Lee
741d7e9dca integration: add Blackhole to bridgeConn
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-28 15:34:36 -07:00
Gyu-Ho Lee
9a726b424d *: fix leaky context creation with cancel
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-07 13:39:42 -07:00
Gyu-Ho Lee
f65aee0759 *: replace 'golang.org/x/net/context' with 'context'
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-07 13:39:42 -07:00
Anthony Romano
59d232adf9 integration: retry remove in TestDecreaseClusterSize
Cluster may go through a second leader election if test machine is
overloaded. Retry remove until it passes without error.

Fixes #8225
2017-09-01 12:06:59 -07:00
Anthony Romano
35c5dcefc2 *: cockroachdb/cmux -> soheilhy/cmux
Has fixes not in fork. Includes SetReadTimeout.
2017-08-22 09:59:59 -07:00
Anthony Romano
5c611a493b integration: grpc on etcd peer ports 2017-08-22 09:59:59 -07:00
Anthony Romano
e29db923bc *: move v2http handlers without /v2 prefix to etcdhttp
Lets --enable-v2=false configurations provide /metrics, /health, etc.

Fixes #8167
2017-07-07 18:35:57 -07:00
Gyu-Ho Lee
581a83dfd9 clientv3/*: add 'MoveLeader' method to 'Maintenance'
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-06-23 13:07:17 -07:00
Anthony Romano
dcf52bbfac etcdserver, embed, integration: don't use pointer for ServerConfig
ServerConfig is owned by etdcserver and unshared, so don't pass or store by
pointer. Also removes duplicated field 'snapCount'.
2017-06-15 13:02:13 -07:00
Anthony Romano
166ae10ca3 integration: use unixs:// if client port configured for tls 2017-05-31 15:51:48 -07:00
fanmin shi
68a72c6b6e v3rpc: change grpc max recv size as needed. 2017-05-25 11:01:51 -07:00
fanmin shi
9e7740011b etcdserver: add --max-request-bytes flag 2017-05-25 11:01:38 -07:00
fanmin shi
e9f464debc integration: creation of cluster now takes maxTxnOps 2017-05-24 14:48:44 -07:00
Anthony Romano
00da3ca725 integration: add lock and election services to proxy tests 2017-05-10 13:06:27 -07:00
Gyu-Ho Lee
22943e7e06 integration: test TLS reload
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-04-27 13:32:09 -07:00
Anthony Romano
fe1ce3a2f0 integration: add pause/unpause to client bridge
Resetting connections sometimes isn't enough; need to stop/resume
accepting connections for some tests while keeping the member up.
2017-04-21 20:22:51 -07:00
Anthony Romano
14d6ed9e5f *: clear redundant return statement warnings (S1027) 2017-04-21 14:01:00 -07:00
Gyu-Ho Lee
472a536052 integration: test 'inflight' range requests
- Test https://github.com/coreos/etcd/issues/7322.
- Remove test case added in https://github.com/coreos/etcd/pull/6662.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-04-17 14:15:36 -07:00
Anthony Romano
bf047ed9d5 integration: v3 election rpc tests 2017-04-07 16:36:38 -07:00
Anthony Romano
f5f4791023 integration: test cluster terminates quickly 2017-03-31 19:19:33 -07:00
Gyu-Ho Lee
2d5f890091 integration: ensure 'StopNotify' on publish error
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-03-21 10:29:00 -07:00
Anthony Romano
300323fa50 integration: test grpc lock service 2017-03-13 15:23:26 -07:00
Hitoshi Mitake
f8a290e7ca *: support jwt token in v3 auth API
This commit adds jwt token support in v3 auth API.

Remaining major ToDos:
- Currently token type isn't hidden from etcdserver. In the near
  future the information should be completely invisible from
  etcdserver package.
- Configurable expiration of token. Currently tokens can be valid
  until keys are changed.

How to use:
1. generate keys for signing and verfying jwt tokens:
 $ openssl genrsa -out app.rsa 1024
 $ openssl rsa -in app.rsa -pubout > app.rsa.pub
2.  add command line options to etcd like below:
--auth-token-type jwt \
--auth-jwt-pub-key app.rsa.pub --auth-jwt-priv-key app.rsa \
--auth-jwt-sign-method RS512
3. launch etcd cluster

Below is a performance comparison of serializable read w/ and w/o jwt
token. Every (3) etcd node is executed on a single machine. Signing
method is RS512 and key length is 1024 bit. As the results show, jwt
based token introduces a performance overhead but it would be
acceptable for a case that requires authentication.

w/o jwt token auth (no auth):

Summary:
  Total:        1.6172 secs.
  Slowest:      0.0125 secs.
  Fastest:      0.0001 secs.
  Average:      0.0002 secs.
  Stddev:       0.0004 secs.
  Requests/sec: 6183.5877

Response time histogram:
  0.000 [1]     |
  0.001 [9982]  |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
  0.003 [1]     |
  0.004 [1]     |
  0.005 [0]     |
  0.006 [0]     |
  0.008 [6]     |
  0.009 [0]     |
  0.010 [1]     |
  0.011 [5]     |
  0.013 [3]     |

Latency distribution:
  10% in 0.0001 secs.
  25% in 0.0001 secs.
  50% in 0.0001 secs.
  75% in 0.0001 secs.
  90% in 0.0002 secs.
  95% in 0.0002 secs.
  99% in 0.0003 secs.

w/ jwt token auth:

Summary:
  Total:        2.5364 secs.
  Slowest:      0.0182 secs.
  Fastest:      0.0002 secs.
  Average:      0.0003 secs.
  Stddev:       0.0005 secs.
  Requests/sec: 3942.5185

Response time histogram:
  0.000 [1]     |
  0.002 [9975]  |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
  0.004 [0]     |
  0.006 [1]     |
  0.007 [11]    |
  0.009 [2]     |
  0.011 [4]     |
  0.013 [5]     |
  0.015 [0]     |
  0.016 [0]     |
  0.018 [1]     |

Latency distribution:
  10% in 0.0002 secs.
  25% in 0.0002 secs.
  50% in 0.0002 secs.
  75% in 0.0002 secs.
  90% in 0.0003 secs.
  95% in 0.0003 secs.
  99% in 0.0004 secs.
2017-03-06 19:46:03 -08:00