54 Commits

Author SHA1 Message Date
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
Chao Chen
2c46b2b299 externalize snapshot catchup entries to etcd flag
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-01-04 19:01:07 -08:00
Piotr Tabor
9e1abbab6e Fix goimports in all existing files. Execution of ./scripts/fix.sh
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-29 09:41:31 +01: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
nic-chen
6f6275e1ab chore: update the warn message on startup when the server name is default
Signed-off-by: nic-chen <chenjunxu6@gmail.com>
2022-10-28 20:56:45 +08:00
nic-chen
191fb306ef fix: apply review suggestion
Signed-off-by: nic-chen <chenjunxu6@gmail.com>
2022-10-27 08:23:22 +08:00
demoManito
a9c3d56508 etcd: remove redundant type conversion
Signed-off-by: demoManito <1430482733@qq.com>
2022-09-20 11:26:02 +08:00
Sam Batschelet
76a5902efa server/etcdmain: add configurable cipher list to gRPC proxy listener
Signed-off-by: Allen Ray <alray@redhat.com>
2022-08-17 10:56:27 -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
Benjamin Wang
1a6fe4dbc6 update the comment for MaxConcurrentStreams to clearly state it's the max value for each client.
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-07 04:51:20 +08: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
Dirc
ba405f64c1
Update link to tuning page 2022-06-08 10:16:04 +02:00
ahrtr
1a3822f2c3 Rename ClientConfig to ConfigSpec
The ClientConfig is a fully declarive configuration, so it makes more
sense to rename it to ConfigSpec. It can also mitigate the confusion
between Config and ClientConfig.
2022-03-13 05:41:49 +08:00
ahrtr
3dcbbf62d9 Move clientconfig into clientv3 so that it can be reused by both etcdctl and v3 discovery 2022-03-12 06:38:41 +08:00
ahrtr
2f36e0c62b Change discovery url to endpoints
Currently the discovery url is just one endpoint. But actually it
should be the same as the etcdctl, which means that it should be
a list of endpoints. When one endpoint is down, the clientv3 can
fail over to the next endpoint automatically.
2022-02-24 09:11:41 +08:00
ahrtr
ebc86d12c0 support v3 discovery to bootstrap a new etcd cluster 2022-02-21 23:22:49 +08:00
ahrtr
1713dc67b5 etcd server shouldn't wait for the ready notification infinitely on startup 2022-01-27 16:19:20 +08:00
Marek Siarkowicz
ee5ef42c5c server: --enable-v2 and --enable-v2v3 is decomissioned 2022-01-14 13:19:30 +01:00
Marek Siarkowicz
7d10899d7f server: Require either cluster version v3.6 or --experimental-enable-lease-checkpoint-persist to persist lease remainingTTL
To avoid inconsistant behavior during cluster upgrade we are feature
gating persistance behind cluster version. This should ensure that
all cluster members are upgraded to v3.6 before changing behavior.

To allow backporting this fix to v3.5 we are also introducing flag
--experimental-enable-lease-checkpoint-persist that will allow for
smooth upgrade in v3.5 clusters with this feature enabled.
2021-12-02 12:26:47 +01:00
Sam Batschelet
63a1cc3fe4 add --experimental-max-learner flag
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-11-09 09:52:00 -05:00
Eng Zer Jun
2a151c8982
*: move from io/ioutil to io and os packages
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2021-10-28 00:05:28 +08:00
Arda Güçlü
e647995a38 Add zap encoding configurable
Json encoding is the default zap encoding value and can not be changeable.
This PR enables configuring zap encoding to console via new flag `log-format`.
2021-09-22 15:48:47 +03:00
Sam Batschelet
a4a82cc982
Merge pull request #13248 from lilic/add-sampling-rate
server: Add sampling rate to distributed tracing
2021-08-30 08:31:00 -04:00
Lili Cosic
810f489017 server: Add sampling rate to distributed tracing
ExperimentalDistributedTracingSamplingRatePerMillion is the
number of samples to collect per million spans.
Defaults to 0.
2021-08-30 13:55:35 +02:00
Sahdev Zala
2526463e44
Merge pull request #13236 from roytman/expensiveRequest
etcdserver: configure "expensive" requests duration
2021-08-02 09:33:43 -04:00
tangcong
8a3c43827b fix self-signed-cert-validity parameter cannot be specified in the config file 2021-07-29 00:13:13 +08:00
Alexey Roytman
2a26f7ae4c
etcdserver: configure "expensive" requests duration
When a unary request takes more than predefined duration, this request
is defined as "expensive" and a warning is printed. The expensive request
duration is hard-coded to 300 ms. It can be not enough for example
for transactions with a lot of operations. The warnings just blow up
the log files and reduce throughput.

This fix allows user to configure the "expensive" request duration.

Signed-off-by: Alexey Roytman <roytman@il.ibm.com>
2021-07-27 08:33:44 +03:00
AlexStocks
184b0e5d49 add sleep interval 2021-05-24 16:22:00 +08:00
Lili Cosic
73c530de83 client,server: Expose reuse-port and reuse-address so they can be
configured via a config file.
2021-05-19 18:41:21 +02:00
Piotr Tabor
85341e08f2
Merge pull request #12968 from serathius/logger-simplify
server: Simplify passing logger setup by passing only logger
2021-05-15 15:58:00 +02:00
Marek Siarkowicz
41ed74824e server: Simplify passing logger setup by passing only logger 2021-05-14 13:14:48 +02:00
Piotr Tabor
ead81df948 Disallow -v2-deprecation>'not-yet' combined with --enable-v2 2021-05-12 18:09:34 +02:00
Piotr Tabor
7c508741b3 Adding --v2-deprecation flag. 2021-05-12 18:09:34 +02:00
Piotr Tabor
e0a8484c8f
Merge pull request #12941 from serathius/defrag
etcdserver: Implement running defrag if freeable space will exceed provided threshold (on boot)
2021-05-12 09:26:56 +02:00
Marek Siarkowicz
efc8505739 etcdserver: Implement running defrag if freeable space will exceed privided threshold 2021-05-11 14:00:29 +02:00
Piotr Tabor
269f22c837 Deprecate V2 API: --enable-v2 and v2v3
Flags `--experimental-enable-v2v3` and '-enable-v2' will raise a warning in 3.5,
in 3.6 they are schedule for decomissioning, such that v2store can stop be written in 3.7.

Deprecation plan in: https://github.com/etcd-io/etcd/issues/12913
2021-05-10 16:19:52 +02:00
Lili Cosic
1a718a958e Add initial Tracing with OpenTelemetry 2021-05-10 10:44:40 +02:00
Sam Batschelet
6decbe15db
Merge pull request #12774 from hexfusion/add-log-rotate
server: add support for log rotation
2021-05-07 12:18:10 -04:00
Sam Batschelet
82b2d5c67d server: add support for log rotation
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-05-07 08:39:51 -04:00
Wilson Wang
98083ea914 server: add experimental flag for using shared buffer in transacton write 2021-05-04 11:59:08 -07:00
Piotr Tabor
3bb7acc8cf Migrate dependencies pkg/foo -> client/pkg/foo 2021-04-07 00:38:47 +02:00
Piotr Tabor
54189f2f60 Enable --pre-vote=true by default in 3.5. 2021-03-12 16:23:23 +01:00
Gyuho Lee
94a371acd7
Merge pull request #12750 from ptabor/20210306-mlock
--experimental-memory-mlock support
2021-03-09 09:13:40 -08:00
Gyuho Lee
6fd85af641
Merge pull request #12702 from hexfusion/add-so
*: add support for socket options
2021-03-09 09:02:24 -08:00
Piotr Tabor
a46a358577 --experimental-memory-mlock support
The flag protects etcd memory from being swapped out to disk.
This can happen in memory constrained systems where mmaped bbolt
area is natural condidate for swapping out.

This flag should provide better tail latency on the cost of higher RSS
ram usage. If the experiment is successful, the logic should get moved
into bbolt layer, where we can protect specific bbolt instances
(e.g. avoid protecting both during defragmentation).
2021-03-07 12:32:57 +01:00
Ben Meier
3d44f5bf80
*: added client-{client,key}-file parameters for supporting separate client and server certs when communicating between peers
In some environments, the CA is not able to sign certificates with both
'client auth' and 'server auth' extended usage parameters and so an operator
needs to be able to set a seperate client certificate to use when making
requests which is different to the certificate used for accepting requests.
This applies to both proxy and etcd member mode and is available as both a CLI
 flag and config file field for peer TLS.

Signed-off-by: Ben Meier <ben.meier@oracle.com>
2021-02-28 14:37:56 +00:00
Sam Batschelet
49078c683b *: add support for socket options
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-02-19 13:31:23 -05:00
Brad Davidson
603d975599 Fix cluster peer HTTP SRV discovery
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-02-03 03:08:13 -08:00