18880 Commits

Author SHA1 Message Date
Benjamin Wang
898415dc90
Merge pull request #14871 from ahrtr/bump_x_20221130
Bump golang.org/x imports to address a bunch of CVEs
2022-11-30 18:17:58 +08:00
Benjamin Wang
3f86db5e53 bump golang.org/x imports to address CVEs
Reference: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-32149

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-30 05:03:43 +08:00
Marek Siarkowicz
61e9ec9833
Merge pull request #14865 from ahrtr/fix_unit_test_20221129
test: fix unit test Instability
2022-11-29 10:56:49 +01:00
Benjamin Wang
fae9435b66 test: fix unit test Instability
When two members in a 5 member cluster are corrupted, and they
have different hashes, etcd will raise alarm for both members,
but the order isn't guaranteed. But if the two corrupted members
have the same hash, then the order is guaranteed. The leader
always raise alarm in the same order as the member list.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-29 06:51:50 +08:00
Benjamin Wang
319651b784
Merge pull request #14862 from ahrtr/add_log_open_wal_failure_20221128
add more debug info for opening WAL files failure
2022-11-29 06:10:16 +08:00
Benjamin Wang
cf171fdd1d
Merge pull request #14828 from ahrtr/identify_corrupted_member_20221123
Identify corrupted member depending on quorum
2022-11-29 06:08:25 +08:00
Benjamin Wang
686846ec65 add more debug info for opening WAL files failure
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-28 18:58:01 +08:00
Marek Siarkowicz
6a156bd555
Merge pull request #14859 from serathius/gofail-cleanup
tests: Cleanup gofail
2022-11-27 21:12:43 +01:00
Marek Siarkowicz
1503f46fd5
Merge pull request #14861 from fuweid/deflake-transport-timeout-case
Deflake transport timeout case
2022-11-27 21:06:28 +01:00
Marek Siarkowicz
dd4d69ca91 tests: Cleanup gofail
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-11-27 20:35:39 +01:00
Wei Fu
cd9ade5403 client/pkg/transport: fix typo in _test.go
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-11-27 22:10:06 +08:00
Wei Fu
8a88660262 client/pkg/transport: deflake TestWriteReadTimeoutListener
There is data race on `stop` channel. After verify write-timeout successfully,
the case won't wait for `blocker` to receive close signal from `stop` channel.
If the new `blocker`, which is to read-timeout verifier, get dial's result
immediately, the new `blocker` might fetch the message from `stop` channel
before old one and then close the connection, which causes that the
`conn.Read` returns `EOF` when it reads data.

How to reproduce this in linux devbox?

Use `taskset` to limit the test process in one-cpu.

```bash
cd ./client/pkg/transport
go test -c -o /tmp/test --race=true ./
taskset -c 0 /tmp/test -test.run TestWriteReadTimeoutListener -test.v -test.cpu 4 -test.count=10000 -test.failfast
```

To fix this, suggest to use seperate `stop` channel to prevent from data
race.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-11-27 22:06:11 +08:00
Benjamin Wang
d545d603e9 test: update both unit test and e2e/integration test for CompactHashCheck
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-26 20:13:20 +08:00
Benjamin Wang
6049af072c etcdserver: intentionally set memberID as 0 when can't identify the corrupted member
If quorum doesn't exist, we don't know which members data are
corrupted. In such situation, we intentionally set the memberID
as 0, it means it affects the whole cluster.
It's align with what we did for 3.4 and 3.5 in
https://github.com/etcd-io/etcd/issues/14849

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-26 19:35:38 +08:00
Benjamin Wang
e95e82f0b9 etcdserver: added a summary for the CompactHashCheck method
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-26 19:35:38 +08:00
Benjamin Wang
85fc09d09b etcdserver: resolve review comments in PR 14828
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-26 19:35:38 +08:00
Benjamin Wang
7b19ee6396 test: add integration test to cover the multiple member corruption case
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-26 19:35:38 +08:00
Benjamin Wang
a3197102e9 test: rollback the change in PR pull/14824
The change did in https://github.com/etcd-io/etcd/pull/14824 fixed
the test instead of the product code. It isn't correct. After we
fixed the product code in this PR, we can revert the change in
that PR.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-26 19:35:38 +08:00
Benjamin Wang
8b98fee9ce etcdserver: detect corrupted member based on quorum
When the leader detects data inconsistency by comparing hashes,
currently it assumes that the follower is the corrupted member.
It isn't correct, the leader might be the corrupted member as well.

We should depend on quorum to identify the corrupted member.
For example, for 3 member cluster, if 2 members have the same hash,
the the member with different hash is the corrupted one. For 5 member
cluster, if 3 members have the same same, the corrupted member is one
of the left two members; it's also possible that both the left members
are corrupted.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-26 19:35:38 +08:00
Marek Siarkowicz
cdb9b8b2a0
Merge pull request #14858 from ahrtr/fix_release_failure_20221126
fix release pipeline failure
2022-11-26 12:32:14 +01:00
Benjamin Wang
72b9d1d31b fix release pipeline failure
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-26 18:40:54 +08:00
Marek Siarkowicz
08cb83ab87
Merge pull request #14856 from ahrtr/bump_testify_20221126
bump github.com/stretchr/testify from v1.7.2 to v1.8.1
2022-11-26 11:11:32 +01:00
Benjamin Wang
285e44378f bump github.com/stretchr/testify from v1.7.2 to v1.8.1
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-26 10:51:32 +08:00
Benjamin Wang
488e5413d7
Merge pull request #14812 from ahrtr/add_hash_revision_etcdctl_20221121
Display hash_revision for `etcdctl endpoint hash`
2022-11-25 19:36:27 +08:00
Benjamin Wang
9a7f9609d6 etcdctl: changed 'revision' to 'hash_revision' in hashkv table output
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-25 18:59:49 +08:00
Benjamin Wang
f2d765d247 etcdctl: update the examples for endpoint hashkv command in readme
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-25 18:49:16 +08:00
Benjamin Wang
cd15507c65 test: enhance case TestEndpointHashKV to check both hash and hashRevision
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-25 18:49:16 +08:00
Benjamin Wang
3b50c60dd7 changelog: cover the change of adding HashRevision into HashKVResponse
Two chanages:
1. Add field `HashRevision` into `HashKVResponse`;
2. Display the new field when executing `etcdctl endpoint hash`.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-25 18:49:16 +08:00
Benjamin Wang
48b8210044 etcdctl: display HashRevision for 127.0.0.1:2379, 1084519789 command
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-25 18:49:16 +08:00
Piotr Tabor
590911dfe3
Merge pull request #14847 from mkumatag/fix_expect
fix TestSignal test
2022-11-25 10:39:25 +01:00
Benjamin Wang
bad80dc2de
Merge pull request #14854 from ahrtr/changelog_memberid_20221125
changelog: add items for both 3.4 and 3.5 changelog to cover the case of removing memberid from corrupt alarm
2022-11-25 17:01:18 +08:00
Benjamin Wang
8e3b87b61f changelog: add items for both 3.4 and 3.5 changelog to cover the case of removing memberid from corrupt alarm
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-25 16:28:38 +08:00
Manjunath Kumatagi
0bc46ec92c
fix TestSignal test
Signed-off-by: Manjunath A Kumatagi <mkumatag@in.ibm.com>
2022-11-25 12:50:02 +05:30
Marek Siarkowicz
f18ac02e0f
Merge pull request #14834 from fuweid/bump-grpc-1.51
bump grpc to v1.51.0 from v1.47.0
2022-11-24 09:07:56 +01:00
Benjamin Wang
b6a3594710
Merge pull request #14840 from Bhargav-InfraCloud/copyright-check-in-test-files
Shell func go_srcs_in_module to list go src+test files (#14827)
2022-11-24 06:03:21 +08:00
Bhargav Ravuri
dbfe42bbd2 comments: fix comments as per goword in go _test pkg files
Comments fixed as per goword in go _test package files that
shell function go_srcs_in_module lists as per changes on #14827

Helps in #14827

Signed-off-by: Bhargav Ravuri <bhargav.ravuri@infracloud.io>
2022-11-24 00:03:00 +05:30
Bhargav Ravuri
18463081ad scripts: go_srcs_in_module to list test packages files
The shell func go_srcs_in_module will now list
1. go src files
2. go test files belong to same packages
3. go test files that belong to _test packages

Fixes #14827

Signed-off-by: Bhargav Ravuri <bhargav.ravuri@infracloud.io>
2022-11-23 23:50:21 +05:30
Bhargav Ravuri
2feec4fe68 comments: fix comments as per goword in go test files
Comments fixed as per goword in go test files that shell
function go_srcs_in_module lists as per changes on #14827

Helps in #14827

Signed-off-by: Bhargav Ravuri <bhargav.ravuri@infracloud.io>
2022-11-23 23:05:42 +05:30
Bhargav Ravuri
cc77eb1011 scripts: go_srcs_in_module to list go source + test files
The shell function go_srcs_in_module will list go test files
along with go src files in the specified module. This helps
in identifying the copyright header misses in test files.

Fixes #14827

Signed-off-by: Bhargav Ravuri <bhargav.ravuri@infracloud.io>
2022-11-23 21:52:09 +05:30
Wei Fu
cf285ea3c7 bump grpc to v1.51.0 from v1.47.0
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-11-23 22:16:22 +08:00
Marek Siarkowicz
51c0b4dff3
Merge pull request #14825 from clarkfw/EtcdProcessClusterConfig-antipattern-name
tests: fix anti-pattern name in `NewEtcdProcessCluster`
2022-11-23 15:11:36 +01:00
Benjamin Wang
a47cdc3951
Merge pull request #14831 from andrewcameronsims/add_copyright_header_issue-14827
Add missing copyright headers
2022-11-23 17:56:42 +08:00
Andrew Sims
f656fa0f49 add missing copyright headers
Signed-off-by: Andrew Sims <andrew.cameron.sims@gmail.com>
2022-11-23 19:13:43 +11:00
Clark
b298c85a34 tests: fix anti-pattern name in NewEtcdProcessCluster
Signed-off-by: Clark <fwyongxing@gmail.com>
2022-11-23 00:32:10 +08:00
Marek Siarkowicz
a87c993bdf
Merge pull request #14824 from fuweid/deflake-TestCompactHashCheckDetectCorruption
tests/integration: deflake Corruption cases
2022-11-22 17:07:23 +01:00
Wei Fu
0b30e83b1d tests/integration: deflake Corruption cases
If the corrupted member has been elected as leader, the memberID in alert
response won't be the corrupted one. It will be a smaller follower ID since
the raftCluster.Members always sorts by ID. We should check the leader
ID and decide to use which memberID.

Fixes: #14823

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-11-22 22:19:55 +08:00
Marek Siarkowicz
5a39c0f6b9
Merge pull request #14822 from shreemaan-abhishek/fix-comment
client: update comment for clarity
2022-11-22 15:18:42 +01:00
Abhishek Choudhary
0721d2f254
client: update comment for clarity
Signed-off-by: Abhishek Choudhary <shreemaan.abhishek@gmail.com>
2022-11-22 19:25:46 +05:30
Marek Siarkowicz
9cc2f645cb
Merge pull request #14817 from serathius/changelog-v3.5.6
Update changelog for v3.5.6 release
2022-11-21 20:59:43 +01:00
Tobias Grieger
d4316f34ac
Merge pull request #14795 from falser101/fix/log_unstable
Fixed https://github.com/etcd-io/etcd/issues/14709
2022-11-21 20:57:05 +01:00