1124 Commits

Author SHA1 Message Date
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
spacewander
508ce517e0 update according to the review
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
2022-08-17 09:25:37 +08:00
spacewander
bebefd8b80 chore: log when an invalid watch request is received
As protobuf doesn't have required field, user may send an empty
WatchRequest by mistake. Currently, etcd will ignore the invalid request
and keep the stream opening. If we don't reject the invalid request by
closing the stream, it would be better to leave a log there.

This commit also fixes a typo in the comment.

Signed-off-by: spacewander <spacewanderlzx@gmail.com>
2022-08-16 11:33:01 +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
Benjamin Wang
fff5d00ccf
Merge pull request #14149 from lavacat/main-txn-panic
server: don't panic in readonly serializable txn
2022-08-14 05:41:57 +08:00
Benjamin Wang
cb5f358b5f
Merge pull request #14330 from chaochn47/auth_test_logging
logging RoleGrantPermission key and range end
2022-08-11 06:39:56 +08:00
Chao Chen
ccd4efc3b3 logging RoleGrantPermission key and range end
Signed-off-by: Chao Chen <chaochn@amazon.com>
2022-08-10 14:51:25 -07:00
stefanbo
6a04f7fbd6 With go-grpc-middleware, add grpc_zap to logging grpc request and response content in grpc-proxy mode In our test environment, it may be very useful to debug who delete etcd's key with grpc-proxy mode
inspired by https://github.com/grpc-ecosystem/go-grpc-middleware

Signed-off-by: stefanbo <stefan_bo@163.com>

Update flag name

1. add changelog
2. update flag name to `experimental-enable-grpc-debug`

Signed-off-by: stefan bo <stefan_bo@163.com>

Update CHANGELOG-3.6.md

Signed-off-by: stefan bo <stefan_bo@163.com>

change flag name

Signed-off-by: stefan bo <stefan_bo@163.com>
2022-08-10 16:10:05 +08:00
Bogdan Kanivets
43bb9d5c22 server: don't panic in readonly serializable txn
Problem: We pass grpc context down to applier in readonly serializable txn.
This context can be cancelled for example due to timeout.
This will trigger panic inside applyTxn

Solution: Only panic for transactions with write operations

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

Signed-off-by: Bogdan Kanivets <bkanivets@apple.com>
2022-08-09 00:46:50 -07:00
Benjamin Wang
649babaf4a
Merge pull request #14276 from yuzhiquan/add-alarm-metrics
Add alarms metrics for server
2022-08-09 05:06:35 +08:00
Sahdev Zala
871d8fdaf1
Merge pull request #14300 from ahrtr/enhance_wal_find_error
Enhance the WAL file related error
2022-08-05 20:35:48 -04:00
yuzhiquanlong
4c13767881 etcdserver: add alarms metrics for server
Signed-off-by: yuzhiquanlong <yuzhiquanlong@gmail.com>
2022-08-03 09:33:02 +08:00
Benjamin Wang
ae36a577d7
Merge pull request #14286 from VladSaioc/bugfix-goroutine-leak
Fixed goroutine leak in server/etcdserver/raft_test.go
2022-08-03 06:02:54 +08:00
Benjamin Wang
3dd7d3f9af enhance the WAL file related error
The `ErrFileNotFound` was used for for three cases:
1. There is no any WAL files (probably due to no read permission);
2. There is no WAL files matching the snapshot index;
3. The WAL file seqs do not increase continuously.

It's not good for debug when users see the `ErrFileNotFound` error,
so in this PR, a different error is returned for each case above.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-08-03 05:37:30 +08:00
VladSaioc
6cded3d94c Fixed goroutine leak in server/etcdserver/raft_test.go
Signed-off-by: VladSaioc <vladsaioc10@gmail.com>
2022-08-02 23:22:55 +02:00
Benjamin Wang
4f0e92d94c
Merge pull request #14262 from mind1949/update-server-etcdserver-raft
server/etcdserver: check whether raftNode has stopped
2022-08-02 05:58:30 +08:00
Austin Benoit
ff56da7745 rafthttp: test transport multiple transport removes
Unit test to verify multiple transport removes does not create an
  issue.

Signed-off-by: Austin Benoit <22805659+AustinBenoit@users.noreply.github.com>
2022-07-28 18:23:17 -04:00
Benjamin Wang
fae4650834
Merge pull request #14280 from falser101/fix/zjf
fix: code cleanup
2022-07-27 07:20:43 +08:00
jianfei.zhang
c26d7f5389 fix: code cleanup
Signed-off-by: jianfei.zhang <jianfei.zhang@daocloud.io>
2022-07-26 22:07:22 +08:00
Marek Siarkowicz
bb7e4653c8 tests: Fix member id in CORRUPT alarm
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-07-26 15:55:22 +02: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
6697fca97d server: Implement compaction hash checking
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-07-26 09:31:14 +02:00
mind1949
f3bd535747 server/etcdserver: fix test
Signed-off-by: mind1949 <lianjie1949@gmail.com>
2022-07-25 23:20:21 +08:00
Marek Siarkowicz
c58ec9fe13 server: Refactor compaction checker
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-07-25 13:59:30 +02:00
Marek Siarkowicz
264498258b tests: Move CorruptBBolt to testutil
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-07-25 13:59:30 +02:00
mind1949
2b0596f859 server/etcdserver: check if raftNode has been stopped
Signed-off-by: mind1949 <lianjie1949@gmail.com>
2022-07-23 08:49:07 +08:00
Benjamin Wang
9c4fe12a88
Merge pull request #14169 from ahrtr/http_max_stream_20220628
Support configuring `MaxConcurrentStreams` for http2
2022-07-12 17:38:43 +08:00
SimFG
e586dc19df lease: Rename Poll to Peek in the LeaseExpiredNotifier
`Poll` means that the elements in the heap will be removed.
And it is more appropriate to use `Peek` to get the top of the heap.

Signed-off-by: SimFG <1142838399@qq.com>
2022-07-07 16:25:26 +08: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
Piotr Tabor
1749a07a20
Merge pull request #14172 from SimFG/snap_log
snap: Delete the nil judgment of the log object
2022-07-04 23:57:15 +02:00
Benjamin Wang
33347b6845
Merge pull request #13954 from mitake/perm-cache-lock
server/auth: protect rangePermCache with a mutex
2022-07-03 07:01:46 +08:00
Hitoshi Mitake
de09174a3f server/auth: protect rangePermCache with a RW lock
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
2022-07-02 23:23:13 +09:00
SimFG
107b7c06ab sanp: Delete the nil judgment of the log object
Move some methods into the `Snapshotter` object for removing the `lg == nil` judgment

Signed-off-by: SimFG <1142838399@qq.com>
2022-06-28 19:35:33 +08:00
Marek Siarkowicz
815e05d226
Merge pull request #14160 from chavacava/patch-1
removes empty option in JSON tag
2022-06-26 18:55:51 +02:00
Marek Siarkowicz
64443f108b
Merge pull request #14157 from SimFG/proxy_pb
proxy: Put the pb object into the struct
2022-06-26 18:53:42 +02:00
chavacava
756d77663b removes empty option in JSON tag
option can not be empty in JSON tag

Signed-off-by: chavacava <salvadorcavadini+github@gmail.com>
2022-06-26 12:13:20 +02:00
SimFG
a6bbf7c10b proxy: Put the pb object into the struct
Avoid repeated creation of pb objects.

Signed-off-by: SimFG <1142838399@qq.com>
2022-06-25 10:15:03 +08:00
SimFG
2a1b7fdb52 verify: Get backend using simple api
Make the code simple and clear.

Signed-off-by: SimFG <1142838399@qq.com>
2022-06-24 16:58:18 +08:00
SimFG
1dcd75f8a2 config: Add the default case when failing to parse the log rotate config json
Make sure that the `setupLogRotation` function must return the error when failing parse json.

Signed-off-by: SimFG <1142838399@qq.com>
2022-06-23 19:41:30 +08:00
Benjamin Wang
e0998f49e1
Merge pull request #14124 from wayblink/index-op
mvcc:add ut for Revisions/CountRevisions and remove RangeSince as it …
2022-06-21 12:41:25 +08:00
wayblink
428d21f5eb mvcc:add ut for Revisions/CountRevisions and remove RangeSince as it is not used
Signed-off-by: wayblink <wayasxxx@gmail.com>
2022-06-21 11:41:44 +08:00
Piotr Tabor
88cd0fe695 Refresh minor dependencies.
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-06-17 10:23:03 +02:00
Piotr Tabor
e7a84b69c8 Update zap to 1.21.
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-06-17 10:05:25 +02:00
Piotr Tabor
8ac23dad88
Merge pull request #14125 from ptabor/20220615-update-grpc2
Update to grpc-1.47 (and fix the connection-string format)
2022-06-17 10:04:11 +02:00
Piotr Tabor
cbf54a0421 Use proper grpc schema (unix:file) for unix sockets.
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-06-17 08:57:23 +02:00
Piotr Tabor
17c1dcd614 Update grpc to 1.47 and go-cmp to 0.5.8.
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-06-17 08:57:22 +02:00
Benjamin Wang
8038e876d3 replace ioutil with os package
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-06-17 10:11:30 +08:00
Benjamin Wang
4c95878f00
Merge pull request #14122 from ahrtr/threshold_20220615
Restrict the max size of each WAL entry to the remaining size of the WAL file
2022-06-17 08:19:42 +08:00