297 Commits

Author SHA1 Message Date
Ivan Valdes
bf04c67408
Backport ignore old leader's leases revoking request
Backport of PR #16822, commits f7e488dc9262685d6624755e0d3bb0a655863248,
67f17166bf2ba337dafb8e0ea8eea5f74a990767,
and f7ff898fd6c2d6dbb54278343073aa4fa5f46a03.

Co-authored-by: Benjamin Wang <benjamin.wang@broadcom.com>
Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-02-20 11:31:29 -08:00
Ivan Valdes
9a3450ae74
tests/e2e: backport e2e cluster setup
Finish backporting the remaining functions from the original backport
from PR #15620.

Backport of commit 65add8cec44b32682e59d2596a592038bac90dcd.

Co-authored-by: Marek Siarkowicz <siarkowicz@google.com>
Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-02-20 11:31:29 -08:00
Ivan Valdes
fd228f2c27
test/e2e: fix WaitLeader backport
Fixes the incorrect backport of WaitLeader, as spawnJsonCmd receives an
expected output string as an argument, which wasn't provided in the
first backport implementation.

Original backport of commit 371179e29208f690477c85fc552e7c824a66f87e from
PR #17398.

Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-02-20 11:29:44 -08:00
Ivan Valdes
ec4128af69
tests/e2e: implement EtcdProcess GoFailClientTimeout
Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-02-15 10:50:26 -08:00
Ivan Valdes
9c067a3c36
tests/e2e: backport WaitLeader
Add Etcdctl function to etcdProcess interface, and implement it in
etcdServerProcess, which is used by WaitMembersForLeader.

Define Etcdctl's Status function, that is used by WaitMembersForLeader
too.

Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-02-08 16:34:33 -08:00
ZhouJianMS
2f8d7d0381 member replace e2e test
Signed-off-by: ZhouJianMS <zhoujian@microsoft.com>
2024-01-10 15:45:26 +08:00
Siyuan Zhang
c43530c402 [3.4] backport health check e2e tests.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2023-12-21 09:33:11 -08:00
Benjamin Wang
f3c0155f03
Merge pull request #16997 from chaochn47/release-3.4-upgrade-grpc-1.52.0
Release 3.4 upgrade grpc 1.52.0
2023-11-22 20:30:11 +00:00
Chao Chen
1665b8ea4d release-3.4: upgrade gRPC-go to v1.52.0
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-11-22 09:41:43 -08:00
Benjamin Wang
c750e01e37 etcdserver: add cluster id check for hashKVHandler
backport https://github.com/etcd-io/etcd/pull/15924 to 3.4

Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2023-11-22 16:55:18 +00:00
Chao Chen
5c95ef3e31 [3.4] backport etcd-io#13359 Fix http2 authority header in single endpoint scenario
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-11-21 23:34:55 -08:00
Bogdan Kanivets
2c527b2aad tests: increase maxWatchDelay to prevent flaky TestWatchDelay*
value is selected empirically after spot checking some logs of flaky workflows

fixes: https://github.com/etcd-io/etcd/issues/15634
Signed-off-by: Bogdan Kanivets <bkanivets@apple.com>
2023-10-17 11:16:52 +02:00
Marek Siarkowicz
9606263da0 Return to default write scheduler since golang.org/x/net@v0.11.0 started using round robin
Introduction of round robin 120fc906b3
Added in v0.10.0 https://github.com/golang/net/compare/v0.10.0...v0.11.0

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-17 11:16:51 +02:00
Lan Liang
47cef60ac4 Backport #13577
Disable auth gracefully without impacting existing watchers.

Signed-off-by: Lan Liang <gcslyp@gmail.com>
2023-07-14 12:48:22 +08:00
Marek Siarkowicz
f836291efa
Merge pull request #16195 from fuweid/fix-panic-for-http-only
[3.4] embed: fix nil pointer dereference when stopServer
2023-07-11 09:02:39 +02:00
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
Wenjia Zhang
1130bf7f84 Adding optional revision bump and mark compacted to snapshot restore
Signed-off-by: Wenjia Zhang <wenjiazhang@google.com>
2023-07-06 23:08:38 -07: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