19373 Commits

Author SHA1 Message Date
Benjamin Wang
f9bdd8c96c
Merge pull request #15502 from chaochn47/deflake_TestMemberList
deflake member_test: enable pre-vote by default and add retry
2023-03-18 07:55:02 +08:00
Benjamin Wang
6cfe4bcf1f
Merge pull request #15501 from chaochn47/defake_TestTracing
deflake TestTracing
2023-03-18 07:24:02 +08:00
Chao Chen
d7f992c351 enable pre-vote by default and add retry on member_test
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-03-17 15:15:13 -07:00
Chao Chen
f163af2bc8 deflake TestTracing
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-03-17 14:39:18 -07:00
Benjamin Wang
4e0e6bdb0f
Merge pull request #15493 from jmhbnz/main
Rename pr and issue triage docs to fix links
2023-03-17 06:55:08 +08:00
James Blair
f312316e81
Rename pr and issue triage docs to fix broken links.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-17 10:26:34 +13:00
Marek Siarkowicz
f3587be6cd
Merge pull request #15485 from HanningLin/verify-goimport
Add verify-goimport to verify all import items are well sorted
2023-03-16 12:06:00 +01:00
Marek Siarkowicz
3717448887
Merge pull request #15479 from serathius/test-cmux
Test connection multiplexing.
2023-03-16 09:16:38 +01:00
Hanning Lin
8bc6b289fb add new goimport_pass
Signed-off-by: Hanning Lin <liam.hanninglin@outlook.com>
2023-03-16 05:50:17 +00:00
Marek Siarkowicz
dfc2c6d44b tests: Add connection muiltiplexer testing
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-15 15:56:39 +01:00
Marek Siarkowicz
aad24ebe2a 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-15 14:47:49 +01:00
Marek Siarkowicz
cbf819740e tests: Allow specifying http version in curl
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-15 09:27:51 +01:00
Marek Siarkowicz
ae30e5c2fb tests: Refactor newClient args
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-15 09:27:51 +01:00
Marek Siarkowicz
e87abf3f13 tests: Refactor CURLPrefixArgs
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-14 16:35:43 +01:00
Marek Siarkowicz
67e3c784ba tests: Remove MetricsURLScheme field
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-14 16:35:43 +01:00
Hitoshi Mitake
c6d8b65ea7
Merge pull request #15432 from tangcong/fix-auth
server/auth: fix auth panic bug when user changes password
2023-03-14 22:13:27 +09:00
Benjamin Wang
cff96fe3a4
Merge pull request #15473 from jmhbnz/main
Refactor: Use proper variable names for urls
2023-03-14 14:25:25 +08:00
James Blair
f6ebff1557
Refactor: Use proper variable names for urls.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-14 18:37:52 +13:00
Benjamin Wang
3fc23ab9a0
Merge pull request #15456 from etcd-io/dependabot/go_modules/tools/mod/github.com/mikefarah/yq/v4-4.31.2
build(deps): bump github.com/mikefarah/yq/v4 from 4.31.1 to 4.31.2 in /tools/mod
2023-03-14 10:27:25 +08:00
Benjamin Wang
6385c7d8ae
Merge pull request #15455 from samruddhikhandale/samruddhikhandale/update-contributing
Update CONTRIBUTING.md reference for Codespaces
2023-03-14 09:35:13 +08:00
dependabot[bot]
263dc15a38
build(deps): bump github.com/mikefarah/yq/v4 in /tools/mod
Bumps [github.com/mikefarah/yq/v4](https://github.com/mikefarah/yq) from 4.31.1 to 4.31.2.
- [Release notes](https://github.com/mikefarah/yq/releases)
- [Changelog](https://github.com/mikefarah/yq/blob/master/release_notes.txt)
- [Commits](https://github.com/mikefarah/yq/compare/v4.31.1...v4.31.2)

---
updated-dependencies:
- dependency-name: github.com/mikefarah/yq/v4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-14 00:40:03 +00:00
Benjamin Wang
eba5845db0
Merge pull request #15466 from etcd-io/dependabot/github_actions/github/codeql-action-2.2.6
build(deps): bump github/codeql-action from 2.2.5 to 2.2.6
2023-03-14 08:17:38 +08:00
Benjamin Wang
7f37b3630f
Merge pull request #15453 from serathius/refactor-url-names
Refactor url names
2023-03-14 08:09:49 +08:00
Piotr Tabor
bea9c95b77
Merge pull request #15467 from ahrtr/fix_format_20230314
test: fix format error
2023-03-13 23:56:48 +01:00
Benjamin Wang
a141585b1c test: fix format error
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-14 05:53:53 +08:00
dependabot[bot]
97a080ba1e
build(deps): bump github/codeql-action from 2.2.5 to 2.2.6
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.5 to 2.2.6.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](32dc499307...16964e90ba)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-13 18:05:12 +00:00
Samruddhi Khandale
cd219ca8df Update CONTRIBUTING.md reference for Codespaces
Signed-off-by: Samruddhi Khandale <samruddhikhandale@github.com>
2023-03-13 17:39:17 +00:00
Marek Siarkowicz
372042c374 refactor: Use proper variable names for urls
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-13 14:48:01 +01:00
Marek Siarkowicz
043525c69d
Merge pull request #15449 from fuweid/fix-15409
tests/integration: deflake TestEtcdVersionFromWAL
2023-03-13 10:36:02 +01:00
tangcong
ad72900dad server/auth: fix auth panic bug when user changes password
Signed-off-by: tangcong <tangcong506@foxmail.com>
2023-03-12 20:49:09 +08:00
Wei Fu
22bdc91302 server/etcdserver: add log for terminating monitors
Adding log for terminating monitors is to make the debug easier.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-03-11 15:07:17 +08:00
Wei Fu
4a9ad47bcc tests/integration: deflake #15409
The cluster version will be initialized after the member becomes leader.
The update is handled asynchronously. It couldn't be updated if the member
has been closed and the go-runtime picks the `s.stopping` channel first.

```go
// e2a5df534c/server/etcdserver/server.go (L2170)

func (s *EtcdServer) monitorClusterVersions() {
	...
	for {
		select {
		case <-s.firstCommitInTerm.Receive():
		case <-time.After(monitorVersionInterval):
		case <-s.stopping:
			return
		}
		...
	}
}
```

Or after the `s.stopping` has been closed, the [UpdateClusterVersion][1] won't
file GoAttach successfully. For the #15409, we can see the warn log
`server has stopped; skipping GoAttach` from GoAttach:

```plain
https://github.com/etcd-io/etcd/actions/runs/4340931587/jobs/7580103902

    logger.go:130: 2023-03-06T07:36:44.253Z	WARN	default	stopping grpc server due to error	{"error": "accept tcp 127.0.0.1:2379: use of closed network connection"}
    logger.go:130: 2023-03-06T07:36:44.253Z	WARN	default	stopped grpc server due to error	{"error": "accept tcp 127.0.0.1:2379: use of closed network connection"}
    logger.go:130: 2023-03-06T07:36:44.253Z	ERROR	default	setting up serving from embedded etcd failed.	{"error": "accept tcp 127.0.0.1:2379: use of closed network connection"}
    logger.go:130: 2023-03-06T07:36:44.253Z	ERROR	default	setting up serving from embedded etcd failed.	{"error": "http: Server closed"}
    logger.go:130: 2023-03-06T07:36:44.253Z	INFO	default	skipped leadership transfer for single voting member cluster	{"local-member-id": "8e9e05c52164694d", "current-leader-member-id": "8e9e05c52164694d"}

    logger.go:130: 2023-03-06T07:36:44.253Z	WARN	default	server has stopped; skipping GoAttach

    ...
```

If the cluster version isn't updated, the minimum storage version will
be v3.5 because the [AuthStatus][2] is introduced in [v3.5][3].
The compare will fail.

To fix this issue, we should wait for cluster version to become ready
after server is ready to serve request.

[1]: <e2a5df534c/server/etcdserver/adapters.go (L45)>
[2]: <071e70cdc4>
[3]: <1b4e54c238>

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-03-11 14:50:37 +08:00
Benjamin Wang
e2a5df534c
Merge pull request #15447 from nullc4t/main
FIX #13389
2023-03-11 05:36:24 +08:00
anon
4dad1ed71e FIX #13389
Dummy fix. Implement wsproxy.Logger with zap.Logger. Use sctx.lg as logger.

Signed-off-by: anon <thisisnot@myemail.com>
2023-03-10 19:58:09 +02:00
Marek Siarkowicz
659c74e60e
Merge pull request #15431 from serathius/watch-random-scheduler
Watch random scheduler
2023-03-10 13:29:54 +01:00
Marek Siarkowicz
f3533f2593 server: Switch back to random scheduler to improve resilience to watch starvation
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-10 12:42:34 +01:00
Marek Siarkowicz
585dfe0186 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-10 12:42:33 +01:00
Marek Siarkowicz
b3bb996880
Merge pull request #15420 from ahrtr/dependency_20230307
Bump some dependencies
2023-03-09 13:03:56 +01:00
Marek Siarkowicz
12d7a32974
Merge pull request #15433 from jmhbnz/main
Update contributing guide with new codespaces developement option
2023-03-09 13:01:52 +01:00
James Blair
b4c499ed7a
Update contributing docs with new codespaces developement option.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-09 22:28:25 +13:00
Benjamin Wang
6bd7660079
Merge pull request #15427 from jmhbnz/main
Updated go to latest 1.19.7 release
2023-03-08 19:06:12 +08:00
James Blair
5b3497555f
Updated go to 1.19.7.
Mitigates CVE-2023-24532.

Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-08 21:39:31 +13:00
Benjamin Wang
24f5d4a6fb
Merge pull request #15201 from dbadoy/main
pkg/schedule: correct comparison for FIFO schedule test
2023-03-08 14:46:58 +08:00
dbadoy4874
ebb5e74ace pkg/schedule:correct comparison for FIFO schedule test
Signed-off-by: dbadoy4874 <dbadoy4874@gmail.com>
2023-03-08 13:18:05 +09:00
Benjamin Wang
aaa8bfee99
Merge pull request #15425 from fuweid/update-TestLeasingDeleteRangeContendTxn
tests/integration: Update TestLeasingDeleteRangeContendTxn
2023-03-08 08:08:38 +08:00
Wei Fu
3419230eea tests/integration: Update TestLeasingDeleteRangeContendTxn
The TestLeasingDeleteRangeContendTxn is trying to test for RangeDelete when
the target resources are being updated.  When the `txnLeasing` wants a
server-side transaction, it needs to ensure all the keys mod revision should
be leass than what it saw. If the compare fails, it will repeat to apply the
server-side transaction until it is sucessful. I believe the test-case is
trying to verify how the `txnLeasing` handles the race issue.

Before the patch #15401, the resource-updating goroutine keeps updating until
the RangeDelete finishes. The testcase is flaky because two goroutines are
sharing one `ctx` and grpc-go client won't wait for the response if `ctx`
has been canceled.

For example,

| DelLease Goroutine   | PutLease Goroutine         | ETCD Server                    | Key/0 Status |
| --                   | ---                        | --                             | --           |
| deleted              |                            |                                | version = 0  |
|                      | send update(key/0=123) req | received update(key/0=123) req | version = 0  |
| cancel               |                            |                                | version = 0  |
|                      | exit because of cancel     |                                | version = 0  |
| get key/0 by putkv   |                            |                                | version = 0  |
|                      |                            | applied update(key/0=123)      | version = 1  |
| get key/0 by raw-cli |                            |                                | version = 1  |

So `raw-cli` gets `[key/0=123]` while the `putkv` gets `[]`. If `putkv`
applies two update reqs to ETCD server and the last one is canceled
before apply, the error will be like:

```
expected [key:"key/0" version:2 value:"123" ], got [key:"key/0" version:1 value:"123" ]
```

The resource-updating goroutine should not share the ctx with RangeDelete here.
And I also revert current main branch because the resource-update goroutine
only updates 8 times and might exit before `RangeDelete`. In this case,
the `txnLeasing` is not handling the race issue.

Fixes: #15352

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-03-07 23:11:41 +08:00
Benjamin Wang
7ed1219861 dependency: bump golang.org/x/net to v0.8.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-07 06:52:07 +08:00
Benjamin Wang
b53d63219a dependency: bump github.com/cheggaaa/pb/v3 to v3.1.2
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-07 06:17:01 +08:00
Marek Siarkowicz
76a563608e
Merge pull request #15408 from jmhbnz/main
Return default snapshot count to 10,000
2023-03-06 10:23:35 +01:00
James Blair
275e10bcf7
Return default snapshot count to 10,000.
The huge (100k+) value was justified when storev2 was being dumped completely with every snapshot.

With storev2 being decomissioned we can checkpoint more frequently for faster recovery.

Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-06 20:21:03 +13:00