17322 Commits

Author SHA1 Message Date
Paco Xu
2a0ecd4078 upgrade cockroachdb/datadriven to v1.0.2 to remove archived dependencies
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2023-01-31 14:42:15 +08:00
Benjamin Wang
78e739083e bump github.com/stretchr/testify to v1.8.1
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-31 07:12:46 +08:00
Benjamin Wang
747de58414 bump bbolt to v1.3.7 for release-3.5
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-31 07:12:46 +08:00
Iavael
82004d0197 docker: remove nsswitch.conf
Signed-off-by: Iavael <905853+iavael@users.noreply.github.com>
2023-01-25 02:46:11 +08:00
Marek Siarkowicz
215b53cf3b version: bump up to 3.5.7 v3.5.7 tests/v3.5.7 etcdctl/v3.5.7 etcdutl/v3.5.7 server/v3.5.7 client/v3.5.7 client/v2.305.7 client/pkg/v3.5.7 raft/v3.5.7 pkg/v3.5.7 api/v3.5.7 2023-01-20 11:15:12 +01:00
Marek Siarkowicz
638c6f1bb1
Merge pull request #15096 from ahrtr/3.5_promote_non_exist_id_20230113
[3.5] etcdserver: return membership.ErrIDNotFound when the memberID not found
2023-01-17 10:23:03 +01:00
Benjamin Wang
53300ece3b etcdserver: return membership.ErrIDNotFound when the memberID not found
Backport https://github.com/etcd-io/etcd/pull/15095.

When promoting a learner, we need to wait until the leader's applied ID
catches up to the commitId. Afterwards, check whether the learner ID
exist or not, and return `membership.ErrIDNotFound` directly in the API
if the member ID not found, to avoid the request being unnecessarily
delivered to raft.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-17 06:24:27 +08:00
Benjamin Wang
816c2e2b8a
Merge pull request #15069 from ahrtr/last_wal_rec_corrupt_3.5_20230108
[3.5] etcdserver: process the scenaro of the last WAL record being partially synced to disk
2023-01-11 16:37:43 +08:00
Benjamin Wang
e1fc545d8a etcdserver: process the scenaro of the last WAL record being partially synced to disk
We need to return io.ErrUnexpectedEOF in the error chain, so that
etcdserver can repair it automatically.

Backport https://github.com/etcd-io/etcd/pull/15068

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-08 05:30:01 +08:00
Benjamin Wang
9e3966fbce
Merge pull request #15041 from ahrtr/update_nsswitch_3.5
[3.5] Update nsswitch.conf for 3.5
2022-12-24 07:13:18 +08:00
Benjamin Wang
cff304502c update nsswitch.conf for 3.5
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-23 20:30:23 +08:00
Benjamin Wang
dd30268727
Merge pull request #15037 from ahrtr/remove_busybox_3.5_20221223
3.5: remove the dependency on busybox
2022-12-23 19:27:46 +08:00
Benjamin Wang
1293f5d4b7 3.5: remove the dependency on busybox
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-23 18:38:40 +08:00
Benjamin Wang
f12f162587
Merge pull request #15018 from ahrtr/deps_3.5_20221219
[3.5] Security: address HIGH Vulnerabilities
2022-12-19 17:41:52 +08:00
Piotr Tabor
cf379a79ea
Merge pull request #14920 from andy-js/andy-js/release-3.5
client/pkg/v3: fixes Solaris build of transport
2022-12-19 09:24:56 +01:00
Benjamin Wang
4e0385134e
Merge pull request #15016 from ahrtr/use_distroless_3.5_20221219
[3.5] Security: use distroless base image to address critical Vulnerabilities
2022-12-19 16:23:15 +08:00
Benjamin Wang
925c0611e0 Remove dependency on gobin
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-19 16:16:55 +08:00
Benjamin Wang
413ec16175 resolve build error: parameter may not start with quote character '
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-19 13:28:25 +08:00
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
b766840c3b security: use distroless base image to address critical Vulnerabilities
Command:
trivy image --severity CRITICAL gcr.io/etcd-development/etcd:v3.5.6 -f json -o 3.5.6_image_critical.json

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-19 07:59:32 +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
Tero Saarni
96ca27a3f2 client/pkg/v3: fixes Solaris build of transport
Add empty implementation for reuse port socket option since Solaris does not
support SO_REUSEPORT.

(cherry picked from commit af626ebfdeb46c1025f9a717959b241fecc44d0a)

Conflicts:
	client/pkg/transport/sockopt_unix.go

Signed-off-by: Andrew Stormont <andyjstormont@gmail.com>
2022-12-13 00:12:15 +00: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