418 Commits

Author SHA1 Message Date
lhy1024
acc9d7c9fe Support multiple values for allowed client and peer TLS identities
Signed-off-by: lhy1024 <admin@liudos.us>
2024-06-06 21:25:17 +08:00
Siyuan Zhang
06f2746fc1 test: update CouldSetSnapshotCatchupEntries to use 3.5.14.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2024-06-04 10:47:54 -07:00
Edwin Xie
4c77726914 Implement flag --experimental-set-member-localaddr
Which sets the LocalAddr to an IP address from --initial-advertise-peer-urls.

Also adds e2e test that requires this flag to succeed.

Co-authored-by: HighPon <s.shiraki.business@gmail.com>
Signed-off-by: Edwin Xie <edwin.xie@broadcom.com>
2024-05-24 18:17:37 +00:00
Siyuan Zhang
b54d7552a7 robustness: add mix version option in exploratoryScenarios.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2024-05-21 16:57:53 +00:00
Wei Fu
7173391154 tests/e2e: reproduce #17780
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-04-21 18:12:00 +08:00
Siyuan Zhang
d602b9f4a2 test: refactor mix_version_test.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2024-04-11 17:53:48 +00:00
Ivan Valdes
a23507080a
tests/e2e: ignore discovery tests when cluster_proxy tag is set
Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-04-01 21:57:11 -07:00
Ivan Valdes
b7488d4355
tests/framework: address golangci var-naming issues
Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-03-25 16:20:18 -07:00
Ivan Valdes
9ac4f33be4
tests/e2e: address golangci var-naming issues
Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-03-21 16:03:48 -07:00
NitishKumar06
3f98ee77d0 etcdserver: add TestErrorLogs test to check for error logs
Signed-off-by: NitishKumar06 <justnitish06@gmail.com>

fix static analysis check

Signed-off-by: NitishKumar06 <justnitish06@gmail.com>

minor fixes

Signed-off-by: NitishKumar06 <justnitish06@gmail.com>
2024-02-14 18:50:04 +05:30
NitishKumar06
70cc19aad5 etcdserver: add memberReplaceLearnerTest to improve testing coverage
Signed-off-by: NitishKumar06 <justnitish06@gmail.com>

get learner member id

Signed-off-by: NitishKumar06 <justnitish06@gmail.com>

get learner member id

Signed-off-by: NitishKumar06 <justnitish06@gmail.com>

check for edge case

Signed-off-by: NitishKumar06 <justnitish06@gmail.com>

modify testcase to use var declaration

Signed-off-by: NitishKumar06 <justnitish06@gmail.com>

remove shadow delcaration of variables

Signed-off-by: NitishKumar06 <justnitish06@gmail.com>

resolve minor fixes

Signed-off-by: NitishKumar06 <justnitish06@gmail.com>
2024-02-06 20:05:16 +05:30
YaoC
f7ab7adf29 server: fix learner metric incorrect issue
Signed-off-by: YaoC <chengyao09@hotmail.com>
2024-01-12 09:36:33 +00:00
Marek Siarkowicz
970abc211e
Merge pull request #17152 from serathius/logs-recover-backend
Improve logs around recovering snapshot backend and add an e2e test
2024-01-05 15:38:58 +01:00
Marek Siarkowicz
3471ef133d Add an e2e test and robustness failpoint around recovering from snapshot backend
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2024-01-04 15:25:24 +01:00
Marek Siarkowicz
538162ad2a Test etcd fails to bootstrap with older db file
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-12-20 16:32:27 +01:00
Benjamin Wang
f7ff898fd6 Resovle some review comments
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2023-12-15 17:53:36 +00:00
Benjamin Wang
f7e488dc92 Add e2e test cases to reproduce the lease revoke issue
Refer to https://github.com/etcd-io/etcd/issues/15247

Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2023-12-15 17:53:36 +00:00
Benjamin Wang
9590a02f94 update test case TestMemberReplace to always connect to stable endpoints
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2023-12-15 12:38:27 +00:00
ZhouJianMS
54822c47e9 member replace e2e test
Signed-off-by: ZhouJianMS <zhoujian@microsoft.com>
2023-12-12 15:22:22 +08:00
Marek Siarkowicz
a968c1f5b3 Add a simple test ensuring membership is properly bootstrapped
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-11-24 12:21:59 +01:00
Marek Siarkowicz
ed3375e076 Remove v2 apply logic
v2 store is no longer available in v3.6.
We can remove apply logic for it as they will never be used.

Only v2 PUT is neeeded as it applies to v3 storage and etcd v3.5 uses it for setting member
attributes and cluster version.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-11-23 14:13:07 +01:00
Marek Siarkowicz
cac2882df8 Refactor v2 deprecation tests to allow different cluster config
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-11-22 14:36:38 +01:00
Siyuan Zhang
12b640523a etcdserver: add linearizable_read check to readyz.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2023-11-21 11:13:20 -08:00
Benjamin Wang
5cc9f7f771
Merge pull request #16835 from chaochn47/e2e-livez-readyz
add livez readyz e2e tests
2023-10-29 15:54:57 +00:00
Chao Chen
42d9e43e5f tests/e2e: enhance livez readyz e2e tests
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-28 18:00:14 -07:00
Marek Siarkowicz
e8ae83fac4 Add e2e tests for livez readyz
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-28 17:57:12 -07:00
Chao Chen
8a6c1335e2 v3rpc: run health notifier to listen on online defrag state change
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-28 17:49:24 -07:00
Chao Chen
ea035471ce online defrag notifies gRPC health server to expose NOT_SERVING status
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-25 08:58:33 -07:00
Chao Chen
1324f03254 add existing http health check handler e2e test
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-18 12:42:23 -07:00
Wei Fu
aea1cd0077 feat: enable unparam lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-10-17 21:24:13 +08:00
Benjamin Wang
a92e0de316
Merge pull request #16753 from fuweid/deflake-TestEtcdTLSVersion
tests: deflake TestEtcdTLSVersion
2023-10-13 10:28:04 +01:00
Wei Fu
6f95ea04be tests: deflake TestEtcdTLSVersion
The proc.Stop just sends the SIGTERM to etcd server. The etcd server
needs time to teardown. If we don't wait for it, the etcd server will
hold the port and then next test case, like TestGrpcProxyAutoSync, will
fail to listen on the port 20000.

```bash
file_/__w/etcd/etcd/tests/fixtures/server.crt_--peer-key-file_/__w/etcd/etcd/tests/fixtures/server.key.insecure_--cert-file_/__w/etcd/etcd/tests/fixtures/server2.crt_--key-file_/__w/etcd/etcd/tests/fixtures/server2.key.insecure_--tls-min-version_TLS1.2_--tls-max-version_TLS1.3) (32856): {"level":"info","ts":"2023-10-13T06:12:32.718845Z","caller":"embed/etcd.go:394","msg":"closing etcd server","name":"e1","data-dir":"/tmp/TestEtcdTLSVersion284993522/001","advertise-peer-urls":["https://127.0.0.1:20000"],"advertise-client-urls":["https://0.0.0.0:0"]}
2023-10-13T06:12:32.7399709Z --- PASS: TestEtcdTLSVersion (1.03s)
2023-10-13T06:12:32.7400181Z === RUN   TestGrpcProxyAutoSync
2023-10-13T06:12:32.7401203Z     logger.go:130: 2023-10-13T06:12:32.719Z	INFO	starting server...	{"name": "TestGrpcProxyAutoSync-test-0"}
2023-10-13T06:12:32.7408306Z     logger.go:130: 2023-10-13T06:12:32.719Z	INFO	spawning process	{"args": ["/__w/etcd/etcd/bin/etcd", "--name=TestGrpcProxyAutoSync-test-0", "--listen-client-urls=http://localhost:20000", "--advertise-client-urls=http://localhost:20000", "--listen-peer-urls=http://localhost:20001", "--initial-advertise-peer-urls=http://localhost:20001", "--initial-cluster-token=new", "--data-dir", "/tmp/TestGrpcProxyAutoSync1139610722/001", "--snapshot-count=10000", "--initial-cluster-token=new", "--initial-cluster=TestGrpcProxyAutoSync-test-0=http://localhost:20001", "--initial-cluster-state=new"], "working-dir": "/__w/etcd/etcd/tests/e2e", "name": "TestGrpcProxyAutoSync-test-0", "environment-variables": ["ETCD_VERIFY=all", "EXPECT_DEBUG=true", "PATH=/__t/go/1.21.3/x64/bin:/go/bin:/__t/go/1.21.3/x64/bin:/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "ETCD_UNSUPPORTED_ARCH=amd64"]}

...

2023-10-13T06:12:32.7559855Z /__w/etcd/etcd/bin/etcd (TestGrpcProxyAutoSync-test-0) (32863): {"level":"fatal","ts":"2023-10-13T06:12:32.735191Z","caller":"etcdmain/etcd.go:181","msg":"discovery failed","error":"listen tcp 127.0.0.1:20000: bind: address already in use","stacktrace":"go.etcd.io/etcd/server/v3/etcdmain.startEtcdOrProxyV2\n\tgo.etcd.io/etcd/server/v3/etcdmain/etcd.go:181\ngo.etcd.io/etcd/server/v3/etcdmain.Main\n\tgo.etcd.io/etcd/server/v3/etcdmain/main.go:40\nmain.main\n\tgo.etcd.io/etcd/server/v3/main.go:31\nruntime.main\n\truntime/proc.go:267"}
```

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-10-13 16:48:37 +08:00
Marek Siarkowicz
c34ccfbc06 Dynamically generate flags passed to etcd binary
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-12 17:31:56 +02:00
Marek Siarkowicz
9f40116fa0 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-10 16:31:42 +02:00
Marek Siarkowicz
f3196e3bbd Avoid timing out and provide a proper error in TestCtlV3GetFormat test
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-05 11:29:39 +02:00
Benjamin Wang
b385121bec test: add test cases to verify consistent reading right after writing
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-10-04 15:26:44 +01:00
Marek Siarkowicz
e31de5e3c1 Revert "etcd server shouldn't wait for the ready notification infinitely on startup"
This reverts commit 1713dc67b5149e74cd28bad7c080c646315d0b06.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-03 21:37:18 +02:00
Marek Siarkowicz
11b441b605 Reuse embed.Config in e2e cluster config
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-01 09:56:31 +02:00
Benjamin Wang
b8103b0fe4 test: fix the TestCtlV3ConsistentMemberList: set the wait-cluster-ready-timeout as 1ns
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-30 14:21:26 +01:00
Benjamin Wang
0b8cad83d1 address the review comments
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-29 12:58:18 +01:00
Benjamin Wang
628b45c099 test: add a test case to verify consistent memberlist on bootstrap
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-28 20:04:47 +01:00
Wei Fu
8870cb3070 *: fix unconvert linter
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-25 19:40:45 +08:00
Wei Fu
4704a5af3a *: fix unused issue
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-25 19:37:18 +08:00
Wei Fu
07effc4d0a *: fix revive linter
Remove old revive_pass in the bash scripts and migirate the revive.toml
into golangci linter_settings.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-24 14:21:11 +08:00
Wei Fu
aa97484166 *: enable goimports in verify-lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-21 21:14:09 +08:00
Wei Fu
df86cadd8b *: fix ineffassign lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-19 22:19:19 +08:00
Wei Fu
5e3910d96c *: fix govet-shadow lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-19 20:24:01 +08:00
Benjamin Wang
5444cdae69 remove all usage of v1 grpc-gateway
1. Manually updated go source file to remove the usage of v1 grpc-gateway;
2. Execute ./scripts/fix.sh

Signed-off-by: Benjamin Wang <wachao@vmware.com>
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-18 11:22:16 +01:00
chenyahui
c0aa3b613b Use any instead of interface{}
Signed-off-by: chenyahui <cyhone@qq.com>
2023-09-17 17:41:58 +08:00
Benjamin Wang
d687bd0989 test: simply the expected output for some curl test cases"
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-11 13:50:26 +01:00