281 Commits

Author SHA1 Message Date
Wei Fu
15efc55905 tests/e2e: allow to use SIGTERM to verify graceful-stop
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-07-07 21:28:51 +08:00
Hitoshi Mitake
c62b5db79d tests: e2e and integration test for timetolive
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
Co-authored-by: Benjamin Wang <wachao@vmware.com>
2023-05-08 22:54:54 +09:00
Benjamin Wang
1f746597ea test: add an e2e test to reproduce https://nvd.nist.gov/vuln/detail/CVE-2021-28235
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-06 22:17:20 +09:00
Marek Siarkowicz
75675cd464 tests: Test separate http port connection multiplexing
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-03 16:11:05 +02:00
Marek Siarkowicz
8dc1244179 server: Add --listen-client-http-urls flag to allow running grpc server separate from http server
Difference in load configuration for watch delay tests show how huge the
impact is. Even with random write scheduler grpc under http
server can only handle 500 KB with 2 seconds delay. On the other hand,
separate grpc server easily hits 10, 100 or even 1000 MB within 100 miliseconds.

Priority write scheduler that was used in most previous releases
is far worse than random one.

Tests configured to only 5 MB to avoid flakes and taking too long to fill
etcd.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-03 16:11:03 +02:00
Marek Siarkowicz
7d62b4d64a tests: Add v2 API to connection multiplexing test
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-30 14:51:39 +02:00
Marek Siarkowicz
7bb5f1f58c tests: Add connection muiltiplexer testing
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-30 14:51:25 +02:00
Marek Siarkowicz
c4a0bac555 tests: Backport tls for etcdctl
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-30 14:49:04 +02:00
Marek Siarkowicz
ec9221f42a tests: Backport etcdctl
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-30 14:49:04 +02:00
Marek Siarkowicz
9e912ba3ed tests: Extract e2e test utils
Consider creating generic testutils for both e2e and integration tests.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-30 14:49:02 +02:00
Marek Siarkowicz
063d3ceed6 tests: Allow specifying http version in curl
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-30 14:48:28 +02:00
Marek Siarkowicz
cee9d4c0f1 tests: Refactor newClient args
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-30 14:48:28 +02:00
Marek Siarkowicz
1bafc86b42 tests: Refactor CURLPrefixArgs
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-30 14:48:28 +02:00
Marek Siarkowicz
73f152e61e Run e2e tests in CI
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-27 12:12:36 +02:00
James Blair
d8f7cfe28d
Backport tls 1.3 support.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-16 21:46:17 +13:00
Marek Siarkowicz
e818b5fac8 test: Test etcd watch stream starvation under high read response load when sharing the same connection
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-14 10:33:06 +01:00
Marek Siarkowicz
6025355ce0 tests: Allow configuring progress notify interval in e2e tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-14 10:26:43 +01:00
tangcong
2070f55aab e2e: add getCountOnlyTest testcase
(cherry picked from commit 3594ab94cfefa7488993ac14e7b410ee63b25d3d)
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-01-13 16:33:56 +08:00
Wei Fu
c320f75a15 grpc-gateway: update version to v1.11.0
The issue is caused by hand-crafted protobuf message. The runtime.errorBody
defines two protobuf fields with same number. We need to upgrade the
version to fix it. Otherwise, the client side won't receive any errors
from server side because of panic.

```
mismatching field: runtime.errorBody.error, want runtime.errorBody.message
```

It can fix the cases

PASSES="build grpcproxy" CPU=4 RACE=true ./test -run TestV3CurlLeaseRevokeNoTLS

The original error is like:

```
v3_curl_lease_test.go:109: testV3CurlLeaseRevoke: prefix (/v3) endpoint (/kv/lease/revoke): error (read /dev/ptmx: input/output error (expected "etcdserver: requested lease not found", got ["curl: (52) Empty reply from server\r\n"])), wanted etcdserver: requested lease not found
    v3_curl_lease_test.go:109: testV3CurlLeaseRevoke: prefix (/v3beta) endpoint (/kv/lease/revoke): error (read /dev/ptmx: input/output error (expected "etcdserver: requested lease not found", got ["curl: (52) Empty reply from server\r\n"])), wanted etcdserver: requested lease not found
```

The `Empty reply from server` is caused by panic and server recover it
but it doesn't have chance to reply to client.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-01-12 17:06:00 +08:00
Benjamin Wang
5413ce46dc bump go version to 1.17.3
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-19 18:34:04 +08:00
Benjamin Wang
90585e03a0 test: add test case to cover the CommonName based authentication
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-17 09:12:13 +08:00
Allen Ray
9254f8f05b Release-3.4: server/etcdmain: add configurable cipher list to gRPC proxy listener
Signed-off-by: Allen Ray <alray@redhat.com>
2022-10-19 16:02:13 -04:00
Benjamin Wang
29911e9a5b etcdserver: fix memberID equals to zero in corruption alarm
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-28 11:01:26 +08:00
Benjamin Wang
6730ed8477
Merge pull request #14410 from vivekpatani/release-3.4
[release-3.4] server,test: refresh cache on each NewAuthStore
2022-09-09 09:34:32 +08:00
Thomas Jungblut
86bc0a25c4 etcdctl: fix move-leader for multiple endpoints
Due to a duplicate call of clientConfigFromCmd, the move-leader command
would fail with "conflicting environment variable is shadowed by corresponding command-line flag".
Also in scenarios where no command-line flag was supplied.

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2022-09-08 15:51:19 +02:00
vivekpatani
c0ef7d52e0 server,test: refresh cache on each NewAuthStore
- permissions were incorrectly loaded on restarts.
- #14355
- Backport of https://github.com/etcd-io/etcd/pull/14358

Signed-off-by: vivekpatani <9080894+vivekpatani@users.noreply.github.com>
2022-08-31 13:08:11 -07:00
Benjamin Wang
6071b1c523 Support configuring MaxConcurrentStreams for http2
Backport https://github.com/etcd-io/etcd/pull/14219 to 3.4

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-21 14:25:29 +08:00
Benjamin Wang
8160e9ebe2 disable test cases on certificate-based authentication which isn't supported by gRPC proxy.
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-06-30 14:11:54 +08:00
Benjamin Wang
bb9113097a fix test failure in TestCtlV3WatchClientTLS
Also refer to the following commit in 3.5,
093282f5ea

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-06-30 10:19:03 +08:00
Lili Cosic
35bd924596 integration,raft,tests: Comply with go v1.15 gofmt 2021-04-19 11:18:13 +02:00
Chris Wedgwood
656dc63eab etcdserver: fix incorrect metrics generated when clients cancel watches
Manual cherry-pick of 9571325fe85173a60c89d6ac6ce3491c7b1ec7a4 for
release-3.4.
2021-03-31 22:59:29 -07:00
yoyinzyc
7cf32c262c e2e: test curl auth on onoption user 2019-12-10 12:53:10 -08:00
Jingyi Hu
b67862c0a6 etcdserver: strip patch version in cluster version
Strip patch version in cluster version metrics.
2019-10-14 17:37:49 -07:00
Gyuho Lee
c91a6bf14f tests/e2e: fix metrics tests
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-10-03 16:02:39 -07:00
Gyuho Lee
d04d96c9ac tests/e2e: run metrics test again
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-30 08:09:32 -07:00
Gyuho Lee
b76f149c35 tests/e2e: skip metrics tests for now
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-26 00:02:48 -07:00
Gyuho Lee
d23af41bca tests/e2e: remove string replace for v3.4.0-rc.1
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-23 01:14:42 -07:00
Gyuho Lee
f13a5102ec tests/e2e: fix version matching
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-15 14:46:19 -07:00
Gyuho Lee
64c16779c0 tests/e2e: pass "rc.0"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-12 01:46:58 -07:00
Gyuho Lee
9ff86fe516 tests/e2e: skip release tests until release candidate
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-03 00:09:10 -07:00
Gyuho Lee
bc9a54beae tests/e2e: fix upgrade, metrics tests
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-02 15:58:25 -07:00
Gyuho Lee
5ef8f2770c
Merge pull request #10962 from hexfusion/promote_mvcc
metrics: promote etcd_debugging_mvcc put_total and delete_total
2019-07-31 22:24:40 -07:00
Sam Batschelet
f46ee91863 metrics: promote etcd_debugging_mvcc put_total and delete_total
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2019-08-01 01:28:07 +00:00
Gyuho Lee
80efba3368 tests/e2e: fix curl proclaim error message
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-29 21:28:15 -07:00
Gyuho Lee
ae87b21a72 tests/e2e: enable-v2 for v2 e2e tests
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-28 21:07:36 -05:00
John Millikin
95f3138b5f
tests: Use more deterministic error message in TestEtcdPeerNameAuth 2019-07-10 14:24:20 +09:00
John Millikin
c6686734b1
tests: Use 'localhost' to match SAN of integration/fixtures/server.crt 2019-07-10 13:33:14 +09:00
John Millikin
5824421f8b
etcdman, pkg: Rename new flags to 'hostname' 2019-07-10 09:30:02 +09:00
John Millikin
9a53601a18
etcdmain, pkg: Support peer and client TLS auth based on SAN fields.
Etcd currently supports validating peers based on their TLS certificate's
CN field. The current best practice for creation and validation of TLS
certs is to use the Subject Alternative Name (SAN) fields instead, so that
a certificate might be issued with a unique CN and its logical
identities in the SANs.

This commit extends the peer validation logic to use Go's
`(*"crypto/x509".Certificate).ValidateHostname` function for name
validation, which allows SANs to be used for peer access control.

In addition, it allows name validation to be enabled on clients as well.
This is used when running Etcd behind an authenticating proxy, or as
an internal component in a larger system (like a Kubernetes master).
2019-07-10 09:30:02 +09:00
Hitoshi Mitake
7bbc536e1c tests/e2e: initialize UserAddOptions{} field in testV3CurlAuth() 2019-06-06 23:07:41 +09:00