444 Commits

Author SHA1 Message Date
Marek Siarkowicz
3b252db4f6 version: bump up to 3.5.11 2023-12-07 11:29:12 +01:00
sharath sivakumar
7f7b91508d upgrade github.com/stretchr/testify,google.golang.org/genproto/googleapis/api,google.golang.org/grpc to make it consistent
Signed-off-by: sharath sivakumar <sharath.sivakumar@mollie.com>
2023-11-15 17:10:40 +01:00
Marek Siarkowicz
0223ca52b8 version: bump up to 3.5.10 2023-10-27 12:33:25 +02:00
Chao Chen
1aa4aa8a96 3.5: upgrade gRPC-go to 1.58.3
The last step with gRPC update behavior changes auditing to resolve CVE #16740 in 3.5

This PR backports #14922, #16338, #16587, #16630, #16636 and #16739 to release-3.5.

Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-17 11:07:08 -07:00
Chao Chen
6f4fa5a27a [release-3.5]: upgrade gRPC-go to v1.52.0
backport https://github.com/etcd-io/etcd/pull/14834 and https://github.com/etcd-io/etcd/pull/16324

Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-16 21:43:00 -07:00
Chao Chen
db16069588 backport #14125 to release-3.5: Update to grpc-1.47 (and fix the connection-string format)
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-12 09:46:49 -07:00
Allen Ray
24ee8e491f bump golang.org/x/net to 0.17.0
Part of https://github.com/etcd-io/etcd/issues/16740

Signed-off-by: Allen Ray <alray@redhat.com>
2023-10-11 10:43:51 -04:00
Wei Fu
7816df7f92 Fix panic in etcd validate secure endpoints
Backport: #13824

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-09 21:06:33 +08:00
James Blair
2a7bffc63e
Backport export reuse-port and reuse-address
so that they cabn be configured via config file.

Co-authored-by: Shawn Gerrard <shawn.gerrard@gmail.com>
Signed-off-by: James Blair <mail@jamesblair.net>
2023-08-18 12:05:19 +12:00
James Blair
9c7c8c6b3f
Backport update to golang 1.20 minor release.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-08-11 21:16:01 +12:00
caojiamingalan
a4fa4d3d34 Backport #14368 to v3.5
Signed-off-by: caojiamingalan <alan.c.19971111@gmail.com>
2023-07-18 14:53:08 -05:00
Benjamin Wang
9ac1d7378a
Merge pull request #16241 from liangyuanpeng/backport_13577_3.5
[3.5] Backport #13577 to 3.5
2023-07-14 16:08:51 +01:00
Lan Liang
960cd26bef Backport #13577
Disable auth gracefully without impacting existing watchers.

Signed-off-by: Lan Liang <gcslyp@gmail.com>
2023-07-14 12:50:21 +08:00
zhangwenkang
4d7b7e5fcd clientv3: create keepAliveCtxCloser goroutine only if ctx can be canceled
Signed-off-by: zhangwenkang <zwenkang@vmware.com>
2023-07-10 23:17:05 +08:00
zhangwenkang
6be3ad36be clientv3: remove v3.WithFirstKey() in Barrier.Wait()
fix the unexpected blocking when using Barrier.Wait(), e.g.
NewBarrier(client, "a").Wait() will block if key "a" is not existed but "a0" is existed, but it should return immediately.

Signed-off-by: zhangwenkang <zwenkang@vmware.com>
2023-07-06 16:18:52 +08:00
Ramil Mirhasanov
2158f21ad5 clientv3/naming/endpoints: fix endpoints prefix bug
fixes bug with multiple endpoints with same prefix

Signed-off-by: Ramil Mirhasanov <ramil600@yahoo.com>
2023-05-23 12:00:21 +00:00
Marek Siarkowicz
bdbbde998b version: bump up to 3.5.9 2023-05-11 13:39:43 +02:00
Marek Siarkowicz
217d183e5a version: bump up to 3.5.8 2023-04-13 12:08:47 +02:00
James Blair
358bcf3fb6
Backport tls 1.3 support.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-15 14:10:14 +13:00
Marek Siarkowicz
e44995e670 Run go mod tidy
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-13 16:56:11 +01:00
James Blair
f0aa228dbf
Updated go to 1.19.7.
Mitigates CVE-2023-24532.

Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-08 22:33:13 +13:00
James Blair
183af509f6
Formatted source code for go 1.19.6.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-02-20 21:33:59 +13:00
Benjamin Wang
e896cc7201 clientv3: correct the nextRev on receving progress notification response
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-02-10 16:47:49 +08:00
James Blair
b9568dba32
Fix regression in timestamp resolution
Historic capnslog timestamps are in microsecond resolution. We need to match that when we migrate to the zap logger.

Signed-off-by: James Blair <mail@jamesblair.net>
2023-02-03 21:45:45 +13: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
Marek Siarkowicz
215b53cf3b version: bump up to 3.5.7 2023-01-20 11:15:12 +01: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
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
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
Marek Siarkowicz
cecbe35ce0 version: bump up to 3.5.6 2022-11-21 15:54:14 +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
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
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
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
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
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
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
Kafuu Chino
dd983c662b *: avoid closing a watch with ID 0 incorrectly
Signed-off-by: Kafuu Chino <KafuuChinoQ@gmail.com>

add test

1

1

1

1

1

1
2022-10-08 20:06:19 +08:00
Hitoshi Mitake
7b568f23ab *: handle auth invalid token and old revision errors in watch
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
2022-10-03 23:00:13 +09:00
Sahdev Zala
db55011d7c server/etcdmain: add configurable cipher list to gRPC proxy listener
Signed-off-by: Allen Ray <alray@redhat.com>
2022-09-29 11:41:57 -04:00
Marek Siarkowicz
19002cfc68 version: bump up to 3.5.5 2022-09-15 14:02:30 +02:00
Benjamin Wang
9ea5b1ba22 Refactor the keepAliveListener and keepAliveConn
Only `net.TCPConn` supports `SetKeepAlive` and `SetKeepAlivePeriod`
by default, so if you want to warp multiple layers of net.Listener,
the `keepaliveListener` should be the one which is closest to the
original `net.Listener` implementation, namely `TCPListener`.

Also refer to https://github.com/etcd-io/etcd/pull/14356

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-08-20 15:03:15 +08:00
Justin Kolberg
eab0b999a8
clientv3: close streams after use in lessor keepAliveOnce method
Streams are now closed after being used in the lessor `keepAliveOnce` method.
This prevents the "failed to receive lease keepalive request from gRPC stream"
message from being logged by the server after the context is cancelled by the
client.

Signed-off-by: Justin Kolberg <amd.prophet@gmail.com>
2022-08-18 09:54:12 -07:00
Benjamin Wang
2751c61f24 update all related dependencies
Upgrade grpc to 1.41.0;
Run ./script/fix.sh to fix all related issue.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-08-07 07:17:27 +08:00
Jille Timmermans
cbedaf90fe Improve error message for incorrect values of ETCD_CLIENT_DEBUG
Signed-off-by: Jille Timmermans <jille@quis.cx>
2022-07-14 09:43:54 +02:00