17313 Commits

Author SHA1 Message Date
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
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