Commit Graph

18286 Commits

Author SHA1 Message Date
spacewander
bebefd8b80 chore: log when an invalid watch request is received
As protobuf doesn't have required field, user may send an empty
WatchRequest by mistake. Currently, etcd will ignore the invalid request
and keep the stream opening. If we don't reject the invalid request by
closing the stream, it would be better to leave a log there.

This commit also fixes a typo in the comment.

Signed-off-by: spacewander <spacewanderlzx@gmail.com>
2022-08-16 11:33:01 +08:00
Benjamin Wang
22cc682606 Merge pull request #14346 from ahrtr/functional_test_upadte_20220815
Improve functional test code
2022-08-16 05:09:49 +08:00
Benjamin Wang
bba4eb4d81 Improve functional test code
Get duplicated code wraped in common functions, and simplify
error handling.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-08-15 16:59:39 +08:00
Sahdev Zala
a1405e9633 Merge pull request #14344 from clarkfw/common-framework-share-constants
tests: e2e and integration share TickDuration constant
2022-08-14 21:22:35 -04:00
Clark
0b9f43410a tests: e2e and integration share TickDuration constant
Signed-off-by: Clark <fwyongxing@gmail.com>
2022-08-14 18:49:46 +08:00
Benjamin Wang
012fc51390 Merge pull request #14304 from clarkfw/e2e-cluster-waitleader
tests: add WaitLeader function to common framework
2022-08-14 13:44:28 +08:00
Benjamin Wang
fff5d00ccf Merge pull request #14149 from lavacat/main-txn-panic
server: don't panic in readonly serializable txn
2022-08-14 05:41:57 +08:00
Benjamin Wang
52f367b1f6 Merge pull request #14208 from ahrtr/print_lease_hex
Print clusterID, memberID and leaseID in hexdecimal
2022-08-13 05:31:40 +08:00
Clark
a5409c62e6 tests: add WaitLeader function to common framework
Signed-off-by: Clark <fwyongxing@gmail.com>
2022-08-11 12:46:40 +08:00
Benjamin Wang
043a3aa70e Merge pull request #14334 from chaochn47/more_logging_around_autoSync
more logging around auto sync
2022-08-11 10:16:19 +08:00
Chao Chen
d4778e78c8 more logging around auto sync
Signed-off-by: Chao Chen <chaochn@amazon.com>
2022-08-10 18:00:06 -07:00
Benjamin Wang
cb5f358b5f Merge pull request #14330 from chaochn47/auth_test_logging
logging RoleGrantPermission key and range end
2022-08-11 06:39:56 +08:00
Benjamin Wang
78a4b64084 Merge pull request #14327 from ahrtr/gitignore_20220810
add .DS_Store into .gitignore
2022-08-11 06:18:23 +08:00
Chao Chen
ccd4efc3b3 logging RoleGrantPermission key and range end
Signed-off-by: Chao Chen <chaochn@amazon.com>
2022-08-10 14:51:25 -07:00
Benjamin Wang
292d03b28a add .DS_Store into .gitignore
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-08-10 13:00:06 +08:00
Benjamin Wang
9592e33b90 Merge pull request #14212 from SimFG/benchmark_watch
benchmark: Fix the panic when running `benchmark watch`
2022-08-10 12:50:36 +08:00
Bogdan Kanivets
43bb9d5c22 server: don't panic in readonly serializable txn
Problem: We pass grpc context down to applier in readonly serializable txn.
This context can be cancelled for example due to timeout.
This will trigger panic inside applyTxn

Solution: Only panic for transactions with write operations

fixes https://github.com/etcd-io/etcd/issues/14110

Signed-off-by: Bogdan Kanivets <bkanivets@apple.com>
2022-08-09 00:46:50 -07:00
Benjamin Wang
b2726c4da3 Merge pull request #12469 from trawler/client_listen_unix_socket
pkg/types: Support Unix sockets in NewURLS
2022-08-09 06:40:31 +08:00
Benjamin Wang
649babaf4a Merge pull request #14276 from yuzhiquan/add-alarm-metrics
Add alarms metrics for server
2022-08-09 05:06:35 +08:00
Benjamin Wang
eea4c10d2f Merge pull request #14299 from clarkfw/fix-status
tests: fix status responses size and nil
2022-08-09 04:01:21 +08:00
Benjamin Wang
216f0ae7e9 Merge pull request #14317 from QianChenglong/fix/insecure-skip-tls-verify
clientv3: fix --insecure-skip-tls-verify not working when not specify…
2022-08-09 01:43:59 +08:00
QianChenglong
8e1e118fea clientv3: fix --insecure-skip-tls-verify not working when not specify --cert-path and --key-path
Fixes 14315

Signed-off-by: QianChenglong <qian_cheng_long@163.com>
2022-08-08 16:24:12 +08:00
Benjamin Wang
c070dedb92 Merge pull request #14306 from spzala/updatechanglogversion
CHANGELOG: update version recommendation
2022-08-06 10:15:03 +08:00
Sahdev Zala
f7a21c1b4e Merge pull request #14320 from ahrtr/3.5_changelog_bump_otl_grpc
[CHANGELOG-3.5] Bump OpenTelemetry to 1.0.1 and gRPC to 1.41.0
2022-08-05 20:37:31 -04:00
Sahdev Zala
871d8fdaf1 Merge pull request #14300 from ahrtr/enhance_wal_find_error
Enhance the WAL file related error
2022-08-05 20:35:48 -04:00
Sahdev Zala
c9578c41dd CHANGELOG: update version recommendation
Update version recommendation per the current policy.

For more details, see discussions under
https://github.com/etcd-io/website/pull/601

Signed-off-by: Sahdev Zala <spzala@us.ibm.com>
2022-08-05 20:26:13 -04:00
Benjamin Wang
bc206bc86b bump OpenTelemetry to 1.0.1 and gRPC to 1.41.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-08-06 06:15:48 +08:00
Benjamin Wang
2fbe399a56 Merge pull request #14319 from ahrtr/3.4.20_date
Update the release date for 3.4.20
2022-08-06 06:05:28 +08:00
Benjamin Wang
b124904972 update the release date for 3.4.20
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-08-06 05:46:51 +08:00
yuzhiquanlong
4c13767881 etcdserver: add alarms metrics for server
Signed-off-by: yuzhiquanlong <yuzhiquanlong@gmail.com>
2022-08-03 09:33:02 +08:00
Benjamin Wang
ae36a577d7 Merge pull request #14286 from VladSaioc/bugfix-goroutine-leak
Fixed goroutine leak in server/etcdserver/raft_test.go
2022-08-03 06:02:54 +08:00
Benjamin Wang
3dd7d3f9af enhance the WAL file related error
The `ErrFileNotFound` was used for for three cases:
1. There is no any WAL files (probably due to no read permission);
2. There is no WAL files matching the snapshot index;
3. The WAL file seqs do not increase continuously.

It's not good for debug when users see the `ErrFileNotFound` error,
so in this PR, a different error is returned for each case above.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-08-03 05:37:30 +08:00
VladSaioc
6cded3d94c Fixed goroutine leak in server/etcdserver/raft_test.go
Signed-off-by: VladSaioc <vladsaioc10@gmail.com>
2022-08-02 23:22:55 +02:00
Clark
7fa88fb8f7 tests: fix status responses size and nil
Signed-off-by: Clark <fwyongxing@gmail.com>
2022-08-03 03:10:45 +08:00
Benjamin Wang
4f0e92d94c Merge pull request #14262 from mind1949/update-server-etcdserver-raft
server/etcdserver: check whether raftNode has stopped
2022-08-02 05:58:30 +08:00
Benjamin Wang
21995a3b76 Merge pull request #14284 from AustinBenoit/test/server_transport_test_remove
rafthttp: test multiple transport removes
2022-08-01 07:12:05 +08:00
Benjamin Wang
68c0cf834a Merge pull request #14288 from VladSaioc/bugfix-goleak-watchtest
Fixed goroutine leak in tests/integration/clientv3/watch_test.go
2022-08-01 06:55:57 +08:00
Benjamin Wang
9e9e500d57 Merge pull request #14287 from VladSaioc/bugfix-queue-test
Fixed goroutine leak
2022-08-01 06:52:40 +08:00
Benjamin Wang
6b19267628 Merge pull request #14289 from VladSaioc/bugfix-goleak-watch-restore-test
Fixed goroutine leak in tests/integration/v3_watch_restore_test.go
2022-08-01 06:24:36 +08:00
VladSaioc
2c89834608 Fixed goroutine leak in tests/integration/v3_watch_restore_test.go
Signed-off-by: VladSaioc <vladsaioc10@gmail.com>
2022-07-31 23:28:26 +02:00
VladSaioc
cbfddfe63f Fixed goroutine leak in tests/integration/clientv3/watch_test.go
Signed-off-by: VladSaioc <vladsaioc10@gmail.com>
2022-07-31 23:09:50 +02:00
VladSaioc
3a775201c0 Fixed goroutine leak
Signed-off-by: VladSaioc <vladsaioc10@gmail.com>
2022-07-31 22:19:59 +02:00
Benjamin Wang
046c46e52e Merge pull request #14255 from ramses/golangci-config
Add golangci-lint config file and `make` target.
2022-07-29 15:47:43 +08:00
Ramsés Morales
3cdc4225e1 Followup to "Add golangci-lint config file"
Addressed comments by @ldez and added `lint-fix` target.

Signed-off-by: Ramsés Morales <ramses@gmail.com>
2022-07-28 17:55:22 -07:00
Ramsés Morales
a7a48168a0 Add golangci-lint config file and make target.
Here we add file `.golangci.yaml`, to have a common configuration for
static analysis. If you use the following IDEs/editors, they will read
the file:

- `vim` with vim-go.
- VSCode.

The initial configuration file is based on Kubernetes' HEAD. We removed
a custom kubernetes-linter for custom kubernetes-logging. We also
changed to Golang version 1.17 (etcd's current target Golang version)
from 1.18.

Also, we added a new target to `Makefile`: `lint`. NOTE that auto-fixing
should be part of a later commit, once we are all happy with how the
configuration file is working for us.

As expected, this change fixes two issues found by this `.golangci.yaml`
in file `contrib/lock/client/client.go`:

- Dead code, removed.
- Innefective assignment, removed.

Finally, we are updating `CONTRIBUTING.md` to mention `golangci-lint`.

We will add a GitHub-action to run `golangci-lint` in a future change.

Local testing done:

- `make build`.
- `make test`.

Both are happy.

This is the initial step to fix
https://github.com/etcd-io/etcd/issues/14164.

Signed-off-by: Ramsés Morales <ramses@gmail.com>
2022-07-28 17:55:08 -07:00
Austin Benoit
ff56da7745 rafthttp: test transport multiple transport removes
Unit test to verify multiple transport removes does not create an
  issue.

Signed-off-by: Austin Benoit <22805659+AustinBenoit@users.noreply.github.com>
2022-07-28 18:23:17 -04:00
Marek Siarkowicz
223b33f23c Merge pull request #14283 from tjungblu/issue_14275
Reduce ExpectFunc polling interval
2022-07-28 14:57:49 +02:00
Thomas Jungblut
eb59368440 Reduce ExpectFunc polling interval.
Fixes issue 14275, flakes close to timeout like TestKVDelete.

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2022-07-28 14:38:44 +02:00
Benjamin Wang
5d96a7273b Merge pull request #14261 from tjungblu/update_locking
update contrib/lock example
2022-07-28 15:18:47 +08:00
Joe Betz
0535742a1f Transition my maintainer status to emeritus
My responsibilities have long since been handed off to ptab@google.com and siarkowicz@google.com. I'd like to reflect that here in the MAINTAINERS file.
2022-07-27 09:50:10 -07:00