17302 Commits

Author SHA1 Message Date
Benjamin Wang
bf1b902111 remove .travis.yml
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-19 13:27:19 +08:00
Benjamin Wang
a612b9285f format the source code and tidy the dependencies using go 1.17.13
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-19 13:26:59 +08:00
Benjamin Wang
69ee8a83ab bump go version to 1.17.13
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-19 13:23:16 +08:00
Benjamin Wang
3337f35f17 deps: bump golang.org/x/net to v0.4.0 to address CVEs
CVE-2021-44716
CVE-2022-27664

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-19 09:28:07 +08:00
Benjamin Wang
410a987cbf
Merge pull request #15010 from 4everming/fix/Specify_branch_name_for_the_Trivy_Scan_in_release3.5
fix:  specify the correct branch name of release-3.5 in workflow for…
2022-12-17 16:13:36 +08:00
zsimon
d178292fec cidc: specify the correct branch name of release-3.5 in workflow for trivy nightly scan
To checkout the corresponding branch in cicd workflow. Specify the correct branch name in each branch.

Signed-off-by: zsimon <zsimon@vmware.com>
2022-12-17 15:30:26 +08:00
Benjamin Wang
3b7248bc87
Merge pull request #15006 from ArkaSaha30/trivy-release-3-5
Add trivy nightly scan for `release-3.5`
2022-12-16 13:59:33 +08:00
ArkaSaha30
4d3c840a9b
Add trivy nightly scan for release-3.5
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com>
2022-12-16 10:59:14 +05:30
Hitoshi Mitake
f1842b6ecf
Merge pull request #14995 from ahrtr/revert_14322_20221215
clientv3: revert the client side change in 14547
2022-12-15 09:39:35 +09:00
Benjamin Wang
1fdfb4292c clientv3: revert the client side change in 14547
In order to fix https://github.com/etcd-io/etcd/issues/12385,
PR https://github.com/etcd-io/etcd/pull/14322 introduced a change
in which the client side may retry based on the error message
returned from server side.

This is not good, as it's too fragile and it's also changed the
protocol between client and server. Please see the discussion
in https://github.com/kubernetes/kubernetes/pull/114403

Note: The issue https://github.com/etcd-io/etcd/issues/12385 only
happens when auth is enabled, and client side reuse the same client
to watch.

So we decided to rollback the change on 3.5, reasons:
1.K8s doesn't enable auth at all. It has no any impact on K8s.
2.It's very easy for client application to workaround the issue.
  The client just needs to create a new client each time before watching.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-15 02:12:49 +08:00
Benjamin Wang
127e9c05b0
Merge pull request #14899 from ahrtr/fix_readyonly_txn_panic_3.5_20221206
[3.5] etcdserver: fix nil pointer panic for readonly txn
2022-12-07 04:28:30 +08:00
Benjamin Wang
c1a89973f0 etcdserver: fix nil pointer panic for readonly txn
Backporting https://github.com/etcd-io/etcd/pull/14895

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-06 18:16:49 +08:00
Benjamin Wang
0b47579263
Merge pull request #14884 from mehvaibh/release-3.5
[3.5] Backport: non mutating requests pass through quotaKVServer when NOSPACE
2022-12-06 07:20:52 +08:00
Vaibhav Mehta
22f599a2b7 Fix go fmt error
Signed-off-by: Vaibhav Mehta <mehvaibh@amazon.com>
2022-12-05 21:04:09 +00:00
Chao Chen
378ad6b517 [3.5] Backport: non mutating requests pass through quotaKVServer when NOSPACE
Signed-off-by: Vaibhav Mehta <mehvaibh@amazon.com>
2022-12-05 21:04:09 +00:00
Benjamin Wang
5454ca67bd
Merge pull request #14852 from ahrtr/remove_memberid_alarm_3.5_20221125
[3.5] etcdserver: intentionally set the memberID as 0 in corruption alarm
2022-11-25 18:14:19 +08:00
Benjamin Wang
ba122c9d56 etcdserver: intentionally set the memberID as 0 in corruption alarm
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-25 16:23:37 +08:00
Marek Siarkowicz
cecbe35ce0 version: bump up to 3.5.6 v3.5.6 tests/v3.5.6 etcdctl/v3.5.6 etcdutl/v3.5.6 server/v3.5.6 client/v3.5.6 client/v2.305.6 client/pkg/v3.5.6 raft/v3.5.6 pkg/v3.5.6 api/v3.5.6 2022-11-21 15:54:14 +01:00
Marek Siarkowicz
d0424a7bf1
Merge pull request #14816 from serathius/trim-v3.5
[3.5] trim build path
2022-11-21 15:46:06 +01:00
Dirkjan Bussink
1a9742c9c4 release: build with consistent paths
This changes the builds to always add -trimpath which removes specific
build time paths from the binary (like current directories etc).

Improves build reproducability to make the final binary independent from
the specific build path.

Lastly, when stripping debug symbols, also add -w to strip DWARF symbols
as well which aren't needed in that case either.

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
2022-11-21 15:19:51 +01:00
Marek Siarkowicz
7ccca083eb
Merge pull request #14799 from serathius/fix-client-fileutil-log
[3.5] client/pkg/fileutil: add missing logger to {Create,Touch}DirAll
2022-11-17 15:39:42 +01:00
Aleksandr Razumov
c91978077b client/pkg/fileutil: add missing logger to {Create,Touch}DirAll
Also populate it to every invocation.

Signed-off-by: WangXiaoxiao <1141195807@qq.com>
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-11-17 14:08:30 +01:00
Marek Siarkowicz
b2821631aa
Merge pull request #14790 from ahrtr/auth_3.5_20221117
[3.5] clientv3: do not refresh token when users use CommonName based authentication
2022-11-17 10:16:42 +01:00
Benjamin Wang
4097c24783 test: add test case to cover the CommonName based authentication
Refer to https://github.com/etcd-io/etcd/issues/14764

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-17 09:10:49 +08:00
Benjamin Wang
9849fa7c66 test: add certificate with root CommonName
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-17 05:56:43 +08:00
Benjamin Wang
69aace20c8 clientv3: do not refresh token when using TLS CommonName based authentication
When users use the TLS CommonName based authentication, the
authTokenBundle is always nil. But it's possible for the clients
to get `rpctypes.ErrAuthOldRevision` response when the clients
concurrently modify auth data (e.g, addUser, deleteUser etc.).
In this case, there is no need to refresh the token; instead the
clients just need to retry the operations (e.g. Put, Delete etc).

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-17 05:54:52 +08:00
Benjamin Wang
5f387e6b7d
Merge pull request #14733 from ahrtr/rev_inconsistency_3.5
[3.5] etcdserver: call the OnPreCommitUnsafe in unsafeCommit
2022-11-14 17:54:22 +08:00
Benjamin Wang
563713e128 etcdserver: call the OnPreCommitUnsafe in unsafeCommit
`unsafeCommit` is called by both `(*batchTxBuffered) commit` and
`(*backend) defrag`. When users perform the defragmentation
operation, etcd doesn't update the consistent index. If etcd
crashes(e.g. panicking) in the process for whatever reason, then
etcd replays the WAL entries starting from the latest snapshot,
accordingly it may re-apply entries which might have already been
applied, eventually the revision isn't consistent with other members.

Refer to discussion in https://github.com/etcd-io/etcd/pull/14685

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-11 17:35:26 +08:00
Benjamin Wang
c2378be1b5
Merge pull request #13748 from kkkkun/add-warning-for-del
add warning message when delete to release-3.5
2022-11-05 16:51:01 +08:00
kkkkun
6797856841 add range flag for delete in etcdctl
Signed-off-by: kkkkun <scuzk373x@gmail.com>
2022-11-05 14:33:37 +08:00
Hitoshi Mitake
cc6a082f9e
Merge pull request #14658 from ahrtr/double_barrier_3.5
[3.5] clientv3: fix the implementation of double barrier
2022-11-02 23:16:11 +09:00
Benjamin Wang
27707209ae
Merge pull request #14676 from cenkalti/release-3.5
server: add more context to panic message
2022-11-02 07:56:06 +08:00
Cenk Alti
be4adc0c55
server: add more context to panic message
Signed-off-by: Cenk Alti <cenkalti@gmail.com>
2022-11-01 19:02:32 -04:00
Benjamin Wang
8902fe9246
Merge pull request #14662 from falser101/release-3.5
[3.5] fix: close maintenance conn
2022-10-31 17:49:19 +08:00
jianfei.zhang
45e31f6c80 fix:close conn
Signed-off-by: jianfei.zhang <jianfei.zhang@daocloud.io>
2022-10-31 16:00:58 +08:00
Benjamin Wang
8e26a1fff1 clientv3: fix the design & implementation of double barrier
Check the client count before creating the ephemeral key, do not
create the key if there are already too many clients. Check the
count after creating the key again, if the total kvs is bigger
than the expected count, then check the rev of the current key,
and take action accordingly based on its rev. If its rev is in
the first ${count}, then it's valid client, otherwise, it should
fail.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-10-31 08:33:27 +08:00
Hitoshi Mitake
0a0f0e3617
Merge pull request #14656 from ahrtr/test_dynamical_add_member
test: added e2e test case for issue 14571: etcd doesn't load auth info when recovering from a snapshot
2022-10-30 17:54:47 +09:00
Benjamin Wang
bd7405a52e test: added e2e test case for issue 14571: etcd doesn't load auth info when recovering from a snapshot
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-10-30 14:49:13 +08:00
Benjamin Wang
17cb291f15
Merge pull request #14648 from mitake/test-authrecover-3.5
[3.5] server: refresh auth info when etcd recovers from a snapshot
2022-10-29 13:43:42 +08:00
Hitoshi Mitake
1e96e0be38 etcdserver: call refreshRangePermCache on Recover() in AuthStore. #14574
Signed-off-by: Oleg Guba <oleg@dropbox.com>
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
2022-10-29 13:56:08 +09:00
Hitoshi Mitake
efb9480b96 server: add a unit test case for authStore.Reocver() with empty rangePermCache
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
2022-10-29 13:26:31 +09:00
Benjamin Wang
7cd9e5a338
Merge pull request #14593 from ZoeShaw101/fix-watch-test-panic-3.5
Backport #14591 to 3.5.
2022-10-16 19:33:26 +08:00
王霄霄
d78f6f7f14 Backport #14591 to 3.5.
Signed-off-by: 王霄霄 <1141195807@qq.com>
2022-10-16 18:52:57 +08:00
Benjamin Wang
ec6f0a74ba
Merge pull request #14500 from dusk125/release-3.5
Release-3.5: server/etcdmain: add configurable cipher list to gRPC proxy listener
2022-10-16 06:35:17 +08:00
Benjamin Wang
62169d12eb
Merge pull request #14582 from tomari/tomari/watch-backoff-for-3.5
[3.5] client/v3: Add backoff before retry when watch stream returns unavailable
2022-10-13 07:02:22 +08:00
Hisanobu Tomari
d3da22fb1f client/v3: Add backoff before retry when watch stream returns unavailable
The client retries connection without backoff when the server is gone
after the watch stream is established. This results in high CPU usage
in the client process. This change introduces backoff when the stream is
failed and unavailable.

Signed-off-by: Hisanobu Tomari <posco.grubb@gmail.com>
2022-10-13 05:26:02 +09:00
Benjamin Wang
acc7463fb2
Merge pull request #13861 from mrueg/rel3.5-fix-make2
[Release-3.5] Makefile: additional logic fix / Update Ubuntu base
2022-10-13 02:17:42 +08:00
Benjamin Wang
2fb9be6f7d
Merge pull request #14578 from ahrtr/wal_log_3.5
[3.5] etcdserver: added more debug log for the purgeFile goroutine
2022-10-13 02:07:24 +08:00
Benjamin Wang
f6c4c84da3 etcdserver: added more debug log for the purgeFile goroutine
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-10-12 19:28:32 +08:00
Benjamin Wang
3afd0735e0
Merge pull request #14573 from pchan/automated-cherry-pick
Automated cherry pick of #13224 #14572
2022-10-12 09:39:05 +08:00