Commit Graph

94 Commits

Author SHA1 Message Date
Gang Li
33d65fc90b TestConfigFileDeprecatedOptions
Signed-off-by: Gang Li <gangligit@gmail.com>
2025-01-14 16:26:50 -08:00
Gang Li
f4e7157ff1 migrate to use corrupt-check-time flag
Signed-off-by: Gang Li <gangligit@gmail.com>

add entry for --corrupt-check-time in help.go

Signed-off-by: Gang Li <gangligit@gmail.com>

remove a space

Signed-off-by: Gang Li <gangligit@gmail.com>

fix format

Signed-off-by: Gang Li <gangligit@gmail.com>

fix cluster.go

Signed-off-by: Gang Li <gangligit@gmail.com>

Add test in e2e for experimental corrupt check time flag

Signed-off-by: Gang Li <gangligit@gmail.com>

fix comment

Signed-off-by: Gang Li <gangligit@gmail.com>

fix comment

Signed-off-by: Gang Li <gangligit@gmail.com>
2025-01-13 11:58:40 -08:00
Joshua Zhang
f9ce13e7ee Avoid deadlock in etcd.Close when stopping during bootstrapping
Signed-off-by: Joshua Zhang <joshua.x.zhang@gmail.com>
2025-01-09 05:31:35 +00:00
Ishan Tyagi
c73b3d1e8f migrate experimental-txn-mode-write-with-shared-buffer flag to feature gate.
Signed-off-by: ishan16696 <ishan.tyagi@sap.com>
2024-12-21 23:46:11 +05:30
Siyuan Zhang
85363bda32 migrate experimental-compact-hash-check-enabled to feature gate.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2024-12-17 09:44:53 -08:00
Benjamin Wang
f54c8f55d3 Deprecate --v2-deprecation and schedule to remove it in 3.8
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2024-12-04 14:44:18 +00:00
Matthieu MOREL
3abdf612b3 fix: enable errorlint in server directory
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-10-26 08:16:47 +02:00
mingqing
0bec6a8efc embed: fix typo client-listen-x to listen-client-x
Signed-off-by: mingqing <mingqing@henji.org>
2024-10-18 11:42:54 +08:00
Lan Liang
a966c07165 migrate experimental-initial-corrupt-check flag to feature gate.
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2024-08-22 14:42:18 +00:00
Siyuan Zhang
bd228cf6d1 migrate experimental-stop-grpc-service-on-defrag flag to feature gate.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2024-08-05 13:46:51 -07:00
Siyuan Zhang
7b355141d9 Add "server-feature-gates" flag.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2024-07-18 13:20:30 -07:00
Benjamin Wang
1d13fc58ff
Merge pull request #14066 from rleungx/add-config
embed: add `GRPCAdditionalServerOptions` config
2024-06-21 06:40:32 +01:00
Benjamin Wang
692e44a80b Update the error message when client certificate isn't provided for secure metrics url
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2024-06-18 14:03:39 +01:00
Gyuho Lee
22f20a827b
test(e2e): add a case where client tls is missing for https metrics url
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2024-06-17 21:09:24 +08:00
Gyuho Lee
a657f069a1
fix(server/embed): enforce non-empty client TLS if scheme is https/unixs
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2024-06-17 18:21:38 +08:00
Ryan Leung
29abd62338 introduce GRPCAdditionalServerOptions
Signed-off-by: Ryan Leung <rleungx@gmail.com>
2024-06-07 16:39:35 +08:00
Edwin Xie
4c77726914 Implement flag --experimental-set-member-localaddr
Which sets the LocalAddr to an IP address from --initial-advertise-peer-urls.

Also adds e2e test that requires this flag to succeed.

Co-authored-by: HighPon <s.shiraki.business@gmail.com>
Signed-off-by: Edwin Xie <edwin.xie@broadcom.com>
2024-05-24 18:17:37 +00:00
Ivan Valdes
2e5188f618
server/embed: address golangci var-naming issues
Addresses issues in ListenPeerUrls, ListenClientUrls,
ListenClientHttpUrls, AdvertisePeerUrls, AdvertiseClientUrls.

Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-04-18 08:30:39 -06:00
Ivan Valdes
66f56d71e4
server: address golangci var-naming issues
Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-03-20 21:12:12 -07:00
Ivan Valdes
14523bdc21
etcdserver: rename MemberId() to MemberID() to address var-naming
Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-03-18 17:18:29 -07:00
Benjamin Wang
362f0a2fcb print error log when creating peer listener failed
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2024-01-24 13:47:30 +00:00
Chao Chen
ea035471ce online defrag notifies gRPC health server to expose NOT_SERVING status
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-25 08:58:33 -07:00
Wei Fu
aea1cd0077 feat: enable unparam lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-10-17 21:24:13 +08:00
Marek Siarkowicz
e31de5e3c1 Revert "etcd server shouldn't wait for the ready notification infinitely on startup"
This reverts commit 1713dc67b5.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-03 21:37:18 +02:00
Wei Fu
aa97484166 *: enable goimports in verify-lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-21 21:14:09 +08:00
Wei Fu
5e3910d96c *: fix govet-shadow lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-19 20:24:01 +08:00
Benjamin Wang
979102f895 clientv3: remove the experimental gRPC API grpccredentials.Bundle
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-08-02 19:35:51 +01:00
Chao Chen
e6c8bf82e0 add uds test cases into e2e TestAuthority
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-06-08 15:54:30 -07:00
AngstyDuck
a7344da7d3 server: default value for config file field auto-compaction-mode is now 'periodic'; added additional checks if auto-compaction-mode is undefined
Signed-off-by: AngstyDuck <solsticedante@gmail.com>
2023-05-09 23:10:44 +08:00
Marek Siarkowicz
549087cd69 server: Fix defer function closure escape
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-30 13:37:31 +02:00
Marek Siarkowicz
bf12179a5a server: Add --listen-client-http-urls flag to allow running grpc server separate from http server
Difference in load configuration for watch delay tests show how huge the
impact is. Even with random write scheduler grpc under http
server can only handle 500 KB with 2 seconds delay. On the other hand,
separate grpc server easily hits 10, 100 or even 1000 MB within 100 miliseconds.

Priority write scheduler that was used in most previous releases
is far worse than random one.

Tests configured to only 5 MB to avoid flakes and taking too long to fill
etcd.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-30 09:49:45 +02:00
Marek Siarkowicz
419a56e51a server: Pick one address that all grpc gateways connect to
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-30 09:49:45 +02:00
Marek Siarkowicz
d1f674d624 server: Extract resolveUrl helper function
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-30 09:49:43 +02:00
Marek Siarkowicz
85c48c4a60 server: Separate client listener grouping from serving
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-30 09:48:46 +02:00
Marek Siarkowicz
372042c374 refactor: Use proper variable names for urls
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-13 14:48:01 +01:00
Tero Saarni
588b98d085 Add TLSv1.3 support.
Added optional TLS min/max protocol version and command line switches to set
versions for the etcd server.

If max version is not explicitly set by the user, let Go select the max
version which is currently TLSv1.3. Previously max version was set to TLSv1.2.

Signed-off-by: Tero Saarni <tero.saarni@est.tech>
2023-01-30 16:16:53 +02:00
Bogdan Kanivets
7e8ebf7727 server: added duplicate warning-unary-request-duration flag
--warning-unary-request-duration is a duplicate of --experimental-warning-unary-request-duration
experimental-warning-unary-request-duration will be removed in v3.7.

fixes https://github.com/etcd-io/etcd/issues/13783

Signed-off-by: Bogdan Kanivets <bkanivets@apple.com>
2022-11-18 18:06:00 +08:00
Benjamin Wang
b48641e5f2
Merge pull request #14348 from VinozzZ/add-integration-test-for-tracing
embed: add integration test for distributed tracing
2022-10-13 02:11:59 +08:00
Benjamin Wang
5746d6eb86 etcdserver: added more debug log for the purgeFile goroutine
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-10-12 17:32:33 +08:00
demoManito
72cf0cc04a etcd: modify declaring empty slices
declare an empty slice to var s []int replace  s :=[]int{}, https://github.com/golang/go/wiki/CodeReviewComments#declaring-empty-slices

Signed-off-by: demoManito <1430482733@qq.com>
2022-09-16 14:41:14 +08:00
Benjamin Wang
74506738b8 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`.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-08-18 04:24:05 +08:00
Yingrong Zhao
ea2f299ba0 embed: add integration test for distributed tracing
To verify distributed tracing feature is correctly setup, this PR adds
an integration test for this feature.
In the process of writing the test, I discovered a goroutine leak due to
the TraceProvider not being closed. This PR fixs this issue as well.

Signed-off-by: Yingrong Zhao <yingrong.zhao@gmail.com>
2022-08-15 11:19:10 -04:00
Marek Siarkowicz
d44bbff278 server: Make corrtuption check optional and period configurable
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-07-26 09:31:15 +02:00
Marek Siarkowicz
c58ec9fe13 server: Refactor compaction checker
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-07-25 13:59:30 +02:00
Benjamin Wang
053ba95ed5 set max concurrent streams to the http2 server
The default max stream is 250 in http2. When there are more then
250 streams, the client side may be blocked until some previous
streams are released. So we need to support configuring a larger
`MaxConcurrentStreams`.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-06 03:43:46 +08:00
杨金珏
6220174687 support custom grpc.MaxConcurrentStreams
There is no update on the original PR (see below) for more then 2
weeks. So Benjamin(@ahrtr) continues to work on the PR. The first
step is to rebase the PR, because there are lots of conflicts with
the main branch.

The change to go.mod and go.sum reverted, because they are not needed.
The e2e test cases are also reverted, because they are not correct.

```
https://github.com/etcd-io/etcd/pull/14081
```

Signed-off-by: nic-chen <chenjunxu6@gmail.com>
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-06 03:43:46 +08:00
Piotr Tabor
a1fe0b8ea3
Merge pull request #14116 from ptabor/20220613-embed-errors
Embed server should log errors (and not get stuck)
2022-06-15 22:37:40 +02:00
Piotr Tabor
fcc8fce4d2 Expand logging in case of embed server not being able to successfully start.
So far the errors were directed to Etcd.Errc (channel) that is not being consumed in practice.

Signed-off-by: Piotr Tabor <ptab@google.com>
2022-06-15 13:50:17 +02:00
Marek Siarkowicz
7c35dadc25 server: Extract corruption detection to dedicated struct
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:19:24 +02:00
Piotr Tabor
651de5a057 Rename EtcdServer.Id with EtcdServer.MemberId.
It was misleading and error prone vs. ClusterId.
2022-05-20 14:32:04 +02:00