16084 Commits

Author SHA1 Message Date
Siyuan Zhang
c43530c402 [3.4] backport health check e2e tests.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2023-12-21 09:33:11 -08:00
Benjamin Wang
2a07f80f77
Merge pull request #17128 from siyuanfoundation/livez-bp-3.4-step2
[3.4] Backport livez/readyz
2023-12-19 09:10:12 +00:00
Siyuan Zhang
b6ab23900d etcdserver: add linearizable_read check to readyz.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2023-12-15 14:00:22 -08:00
Siyuan Zhang
c58ef8d10f etcdserver: add metric counters for livez/readyz health checks.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2023-12-15 08:39:51 -08:00
Siyuan Zhang
f4c229a41d etcdserver: add livez and ready http endpoints for etcd.
Add two separate probes, one for liveness and one for readiness. The liveness probe would check that the local individual node is up and running, or else restart the node, while the readiness probe would check that the cluster is ready to serve traffic. This would make etcd health-check fully Kubernetes API complient.

Signed-off-by: Siyuan Zhang <sizhang@google.com>
2023-12-15 08:39:51 -08:00
Chao Chen
d4861d660b http health check bug fixes
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-12-15 08:39:51 -08:00
Benjamin Wang
963af731bd
Merge pull request #17120 from siyuanfoundation/livez-bp-3.4
[3.4] Backport healthcheck code cleanup
2023-12-15 09:52:50 +00:00
Marek Siarkowicz
4a8381a461 server: Split metrics and health code
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2023-12-14 10:25:43 -08:00
Siyuan Zhang
cc44646a2e server: Cover V3 health with tests
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2023-12-14 10:23:49 -08:00
Siyuan Zhang
f009772c84 server: Refactor health checks
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2023-12-14 10:23:36 -08:00
Benjamin Wang
4fe68b4016
Merge pull request #17112 from ivanvc/release-3.4-backport-ssrf
[3.4] Backport disable redirects in peer communication
2023-12-13 19:30:13 +00:00
Ivan Valdes
838cd9aa00
server: disable redirects in peer communication
Disable following redirects from peer HTTP communication on the client's side.
Etcd server may run into SSRF (Server-side request forgery) when adding a new
member. If users provide a malicious peer URL, the existing etcd members may be
redirected to another unexpected internal URL when getting the new member's
version.

Signed-off-by: Ivan Valdes <ivan@vald.es>
2023-12-13 09:21:53 -08:00
Marek Siarkowicz
e74970d5a1 server: Run health check tests in subtests
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2023-12-11 17:07:09 -08:00
Marek Siarkowicz
34d2e743d2 server: Rename test case expect fields
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2023-12-11 17:04:08 -08:00
Marek Siarkowicz
ddf7a69fba server: Use named struct initialization in healthcheck test
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2023-12-11 17:03:48 -08:00
Benjamin Wang
39b440caed
Merge pull request #17076 from jonasrdl/release-3.4-update-to-go-1.21.5
[3.4] Update go version to 1.20.12
2023-12-06 20:10:06 +00:00
Jonas Riedel
ab34e01f34 etcd: Update go version to 1.20.12
Signed-off-by: Jonas Riedel <jonasriedel@pm.me>
2023-12-06 20:08:24 +01:00
Benjamin Wang
adf6bd245b Bump version to 3.4.28
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
v3.4.28
2023-11-23 14:29:31 +00:00
Benjamin Wang
75d2407fc0
Merge pull request #16990 from YaoC/backport-12890
[3.4] backport #12890 learner support snapshot RPC
2023-11-23 13:56:28 +00:00
Benjamin Wang
5fb8e88d78
Merge pull request #16999 from chaochn47/release-3.4-upgrade-grpc-1.58.3
[3.4] Upgrade grpc 1.58.3
2023-11-23 09:51:11 +00:00
Chao Chen
2c8e2e933f [3.4] backport #16790: upgrade grpc to 1.58.3
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-11-22 14:58:32 -08:00
Benjamin Wang
f3c0155f03
Merge pull request #16997 from chaochn47/release-3.4-upgrade-grpc-1.52.0
Release 3.4 upgrade grpc 1.52.0
2023-11-22 20:30:11 +00:00
Chao Chen
f549da33de backport https://github.com/etcd-io/etcd/pull/12709 and https://github.com/etcd-io/etcd/pull/12801 to resolve gogo unmarshal errors
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-11-22 11:14:50 -08:00
Benjamin Wang
6e6b615918
Merge pull request #16995 from ahrtr/3.4_clusterId_20231122
[3.4] etcdserver: add cluster id check for hashKVHandler
2023-11-22 17:52:03 +00:00
Chao Chen
1665b8ea4d release-3.4: upgrade gRPC-go to v1.52.0
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-11-22 09:41:43 -08:00
Chao Chen
d29115b9cd release-3.4 upgrade grpc to 1.51.0
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-11-22 09:16:13 -08:00
Benjamin Wang
c750e01e37 etcdserver: add cluster id check for hashKVHandler
backport https://github.com/etcd-io/etcd/pull/15924 to 3.4

Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2023-11-22 16:55:18 +00:00
Benjamin Wang
fe68345104
Merge pull request #16988 from chaochn47/release-3.4-backport-authority-header-fix
[3.4] backport #13359 Fix http2 authority header in single endpoint scenario
2023-11-22 10:10:37 +00:00
tangcong
4ff558ee53 [3.4] backport #12890 learner support snapshot RPC
Signed-off-by: YaoC <chengyao09@hotmail.com>
2023-11-22 09:48:10 +00:00
Chao Chen
5c95ef3e31 [3.4] backport etcd-io#13359 Fix http2 authority header in single endpoint scenario
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-11-21 23:34:55 -08:00
Benjamin Wang
1e754357a8
Merge pull request #16916 from arjunmalhotra1/release-3.4
[3.4] etcd: upgrade go version from 1.20.10 to 1.20.11
2023-11-13 09:30:07 +00:00
arjunmalhotra1
aa65306339 etcd: upgrade go version from 1.20.10 to 1.20.11
To keep etcd projects up to date with the latest patch releases &
incorporate the latest security updates.

Signed-off-by: arjunmalhotra1 <am2cj@virginia.edu>
2023-11-12 22:11:26 -06:00
Benjamin Wang
1eb276c33d
Merge pull request #16857 from chaochn47/release-3.4-atomic-endpoints
[3.4] backport client: call .Endpoints() in dial() in client/v3/client.go instead of accessing cfg.Endpoints directly
2023-11-01 16:31:53 +00:00
Chao Chen
97a6f957b2 Fix unit test unreferenced mu in clientv3/client_test.go
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-31 10:24:08 -07:00
Yi-Shu Tai
055b6d7b19 client: call .Endpoints() in dial() in client/v3/client.go instead of accessing cfg.Endpoints directly
0cdd558361/client/v3/client.go (L299) accesses
endpoints without acquiring lock. Fix it to call Endpoints()

Fix #13201

Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-31 09:39:20 -07:00
Benjamin Wang
0fb0045780
Merge pull request #16844 from chaochn47/release-3.4-replace-balancer
[3.4] Backport #12671 clientv3: Replace balancer with upstream grpc solution
2023-10-31 09:36:12 +00:00
Chao Chen
3a0dd2d6a4 [3.4] backport #12706 clientv3: PS: Replace balancer with upstream grpc solution
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-30 09:26:40 -07:00
Chao Chen
83da5ff575 [3.4] Backport #12671 clientv3: Replace balancer with upstream grpc solution
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-30 09:26:40 -07:00
Benjamin Wang
e1430f2a1b
Merge pull request #16849 from jmhbnz/backport-rejectoldcluster-fix
[3.4] Backport clientv3: fix init client error
2023-10-30 15:50:42 +00:00
James Blair
678b00adf9
Backport clientv3: fix errors init client RejectOldCluster.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-10-30 19:30:10 +13:00
Benjamin Wang
888625cc71
Merge pull request #16843 from jmhbnz/backport-barrier-wait-fix
[3.4] Backport clientv3: remove v3.WithFirstKey() in Barrier.Wait()
2023-10-28 09:39:55 +01:00
James Blair
c2d5644a38
Backport 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: James Blair <mail@jamesblair.net>
2023-10-28 09:30:37 +13:00
Benjamin Wang
61002209fc
Merge pull request #16842 from chaochn47/release-3.4-grpc-dialer
Backport [3.4] clientV3: simplify grpc dialer usage. Remove workaround #11184 after bumping grpc to 1.26.0.
2023-10-27 20:38:25 +01:00
yoyinzyc
03f79003d4 clientV3: simplify grpc dialer usage. Remove workaround #11184 after bumping grpc to 1.26.0.
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-27 12:10:54 -07:00
Marek Siarkowicz
d152339b5b
Merge pull request #16826 from chaochn47/release-3.4-authenticate
[3.4] Backport clientv3:get AuthToken gracefully without dialing gRPC with balancer API to get extra connection
2023-10-27 14:15:02 +02:00
Benjamin Wang
5801fbdccf
Merge pull request #16834 from ahrtr/3.4_bump_bbolt_1.3.8_20231026
[3.4] Bump bbolt to 1.3.8 for release-3.4
2023-10-27 09:57:56 +01:00
Benjamin Wang
452e4cc0a9 Bump bbolt to 1.3.8 for etcd 3.4
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-10-26 16:36:50 +01:00
CFC4N
3181b44d76 clientv3: get AuthToken gracefully without extra connection.
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-25 12:51:30 -07:00
CFC4N
0cf5a72c2a credentials: let GetRequestMetadata() return nil when authToken isn't initialized.
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-25 12:51:30 -07:00
CFC4N
1fc259d655 etcdserver: check authinfo if it is not InternalAuthenticateRequest.
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-25 12:51:30 -07:00