Benjamin Wang
76e7fe7057
Merge pull request #17382 from fuweid/backport-17365-to-35
...
[3.5] etcdserver: drain leaky goroutines before test completed
2024-02-06 15:54:08 +00:00
Wei Fu
a965801b6e
etcdserver: drain leaky goroutines before test completed
...
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-02-06 12:11:33 +08:00
Allen Ray
3d64877dc2
[3.5] Update to go1.21
...
Signed-off-by: Allen Ray <alray@redhat.com>
2024-02-02 14:25:53 -05:00
Marek Siarkowicz
e7b3bb6cca
version: bump up to 3.5.12
2024-01-31 11:32:22 +01:00
Marek Siarkowicz
8599d48f80
Bump golang.org/x/crypto to v0.17+ to address CVE-2023-48795
...
This is the minimal set of package updates I get after running:
./scripts/update_dep.sh golang.org/x/crypto v0.17.0
make
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2024-01-30 12:02:49 +01:00
Benjamin Wang
0f494e02fa
test: fix TestHashKVWhenCompacting: ensure all goroutine finished
...
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2024-01-25 13:32:03 +00:00
Benjamin Wang
926d0227bd
print error log when creating peer listener failed
...
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2024-01-24 13:50:38 +00:00
Rahul More
2c3b614090
mvcc: Printing etcd backend database related metrics inside scheduleCompaction function
...
Backporting commit 21bbc82 in etcd 3.5
To improve traceability of backend database usage, Added below parameter
related to backend database usage metrics inside scheduledCompaction
function.
current-db-size-bytes
current-db-size
current-db-size-in-use-bytes
current-db-size-in-use
Signed-off-by: Rahul More <rahulbapumore@gmail.com>
2024-01-22 19:10:20 +05:30
Siyuan Zhang
2d531a300a
commit bbolt transaction if there is any pending deleting operations
...
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2024-01-11 13:34:14 -08:00
Siyuan Zhang
f219ab445e
add tests to test tx delete consistency.
...
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2024-01-11 13:29:54 -08:00
Marek Siarkowicz
f3a27b3745
Don't flock snapshot files
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2024-01-08 15:06:12 +01:00
Ishan Tyagi
0ac8e50a1a
Add a unit tests and missing flags in etcd help.
...
Signed-off-by: ishan16696 <ishan.tyagi@sap.com>
2024-01-05 14:46:42 +05:30
Ishan Tyagi
f87048a92b
Add missing flag in etcd help.
...
Signed-off-by: ishan16696 <ishan.tyagi@sap.com>
2024-01-02 18:08:20 +05:30
Marek Siarkowicz
d6d263ac8d
Check if be is nil to avoid panic when be is overriden with nil by recoverSnapshotBackend on line 517
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-12-20 11:41:54 +01:00
Marek Siarkowicz
a2e9dc8cc0
Don't redeclare err and snapshot variable, fixing validation of consistent index and closing database on defer
...
`err` variable shared throughout the NewServer function and used on line
396 to defer decision whether backend should be closed when starting
the server failed.
`snapshot` variable is first defined 407, redeclared locally on line 496 and later
again used on line 625. Creation of local variable is a bug introduced
in https://github.com/etcd-io/etcd/pull/11888 .
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-12-20 11:31:47 +01:00
Siyuan Zhang
b8d5e79fc1
[3.5] backport health check e2e tests.
...
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2023-12-07 09:51:39 -08:00
Marek Siarkowicz
3b252db4f6
version: bump up to 3.5.11
2023-12-07 11:29:12 +01:00
Marek Siarkowicz
6f125ce33b
Merge pull request #17039 from siyuanfoundation/release-3.5-step2
...
[3.5] Backport livez/readyz
2023-12-07 09:53:18 +01:00
Siyuan Zhang
ebb7e796c3
etcdserver: add linearizable_read check to readyz.
...
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2023-12-06 11:12:14 -08:00
Ivan Valdes
98aa466905
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-05 10:59:25 -08:00
Marek Siarkowicz
ce4ae2beb6
Merge pull request #17024 from jmhbnz/backport-ssrf-fix
...
[3.5] Backport disable following redirects when checking peer urls
2023-11-28 21:22:32 +01:00
Siyuan Zhang
293fc21cd8
etcdserver: add metric counters for livez/readyz health checks.
...
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2023-11-27 12:52:15 -08:00
Siyuan Zhang
f5d7f997d6
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-11-27 12:52:15 -08:00
Chao Chen
2b54660a04
http health check bug fixes
...
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-11-27 12:52:15 -08:00
Marek Siarkowicz
d4e86108e3
Merge pull request #17000 from siyuanfoundation/livez-bp-3.5-step1
...
[3.5] Backport healthcheck code cleanup
2023-11-27 19:59:40 +01:00
Marek Siarkowicz
46e394242f
server: Split metrics and health code
...
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2023-11-27 09:31:00 -08:00
Marek Siarkowicz
8ab1c0f25b
server: Cover V3 health with tests
...
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2023-11-27 09:31:00 -08:00
Marek Siarkowicz
9db8ddbb8c
server: Refactor health checks
...
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2023-11-27 09:31:00 -08:00
Marek Siarkowicz
eed94f6f94
server: Run health check tests in subtests
...
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2023-11-27 09:31:00 -08:00
Marek Siarkowicz
2f6c84e91d
server: Rename test case expect fields
...
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2023-11-27 09:31:00 -08:00
Marek Siarkowicz
c6784a7e82
server: Use named struct initialization in healthcheck test
...
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2023-11-27 09:31:00 -08:00
James Blair
9e21048c4b
Backport server: Don't follow redirects when checking peer urls.
...
It's possible that etcd server may run into SSRF situation when adding a new member. If users provide a malicious peer URL, the existing etcd members may be redirected to other unexpected internal URL when getting the new member's version.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-11-27 21:48:50 +13:00
James Blair
5a564d56d7
Backport server: Have tracingExporter own resources it initialises.
...
Signed-off-by: James Blair <mail@jamesblair.net>
2023-11-26 10:22:10 +13:00
James Blair
3a54851f48
Backport server: Add sampling rate to distributed tracing.
...
ExperimentalDistributedTracingSamplingRatePerMillion is the
number of samples to collect per million spans.
Defaults to 0.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-11-26 10:22:10 +13:00
sharath sivakumar
f26074ae56
CVE-2023-47108: Backport go.opentelemetry.io/otel@v1.20.0 and go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc@v0.46.0
...
Signed-off-by: sharath sivakumar <sharath.sivakumar@mollie.com>
2023-11-15 14:09:07 +01:00
Marek Siarkowicz
0223ca52b8
version: bump up to 3.5.10
2023-10-27 12:33:25 +02:00
Benjamin Wang
88beb6ca47
bump bbolt to 1.3.8 for etcd 3.5
...
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-10-26 16:32:07 +01:00
Benjamin Wang
3521aaad9a
Merge pull request #16790 from chaochn47/3.5-grpc-update
...
[3.5] Upgrade gRPC-go to 1.58.3
2023-10-19 10:21:36 +01:00
Marek Siarkowicz
31b7c58fd5
Merge pull request #16637 from serathius/check-cluster-id-release-3.5
...
[release-3.5] etcdserver: add cluster id check for hashKVHandler
2023-10-17 20:58:21 +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
caojiamingalan
04cfb4c660
etcdserver: add cluster id check for hashKVHandler
...
Signed-off-by: caojiamingalan <alan.c.19971111@gmail.com>
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-17 13:27:47 +02: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
Marek Siarkowicz
404eeaa74e
Return to default write scheduler since golang.org/x/net@v0.11.0 started using round robin
...
Introduction of round robin 120fc906b3
Added in v0.10.0 https://github.com/golang/net/compare/v0.10.0...v0.11.0
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-12 15:19:17 +02: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
James Blair
164175dfe3
Backport adding unit test for socket options.
...
Co-authored-by: Shawn Gerrard <shawn.gerrard@gmail.com>
Signed-off-by: James Blair <mail@jamesblair.net>
2023-08-18 19:14:57 +12: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
f62a894ae7
Fix goword failure in rafthttp/transport.go.
...
Signed-off-by: James Blair <mail@jamesblair.net>
2023-08-11 21:47:30 +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
eb9bfaa983
Follow up https://github.com/etcd-io/etcd/pull/16068#discussion_r1263667496
...
Add a UnsafeReadScheduledCompact and UnsafeReadFinishedCompact
Signed-off-by: caojiamingalan <alan.c.19971111@gmail.com>
2023-07-18 10:54:16 -05:00