65eeb7ff17
server/auth: disallow creating empty permission ranges
...
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com >
Co-authored-by: Benjamin Wang <wachao@vmware.com >
2023-02-27 22:55:36 +09:00
de9c0f8fea
dependency: bump github.com/golang-jwt/jwt/v4 to v4.5.0
...
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2023-02-21 05:29:53 +08:00
b17b9c1428
chore: Use http constants to replace numbers as parameters
...
Signed-off-by: xin.li <xin.li@daocloud.io >
2023-02-20 11:53:41 +08:00
a7e94c4843
security: bump golang.org/x/net to v0.7.0 to address CVE GO-2023-1571
...
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2023-02-17 11:29:47 +08:00
d0c3112d5a
dependency: bump go.opentelemetry.io/otel from 1.11.2 to 1.13.0
...
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2023-02-15 18:33:00 +08:00
1d8fe11ad9
dependency: bump golang.org/x/net from 0.5.0 to 0.6.0
...
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2023-02-14 17:40:47 +08:00
cc47f7bc7c
dependency: bump gopkg.in/natefinch/lumberjack.v2 from 2.0.0 to 2.2.1
...
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2023-02-14 17:40:47 +08:00
1fe7b9793a
etcdserver: add failpoints walBeforeSync and walAfterSync
...
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2023-02-08 09:08:09 +08:00
f4cc163190
Merge pull request #15156 from Nordix/add-minmax-allow-tls13
...
Add TLSv1.3 support.
2023-01-31 10:11:38 +01:00
23e89b98a3
bump bbolt to v1.3.7
...
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2023-01-31 07:04:29 +08:00
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
e2b8e86624
etcdserver: correct the old name of notifyc in comments
...
The old name(raftDone) of the channel(notifyc) which indicates the apply has been
completed is left unchanged in the comments, resulting in confusion when reading
the source code.
Signed-off-by: caojiamingalan <alan.c.19971111@gmail.com >
2023-01-27 10:02:22 +08:00
63902fafbd
Change verb and use switch stmt
...
Signed-off-by: Sasha Melentyev <sasha@melentyev.io >
2023-01-25 03:47:07 +08:00
5b8d7698c8
dependency: bump github.com/coreos/go-semver from 0.3.0 to 0.3.1
...
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2023-01-24 16:59:37 +08:00
0f4d7a7483
Cleanup
...
Signed-off-by: Sasha Melentyev <sasha@melentyev.io >
2023-01-21 15:57:48 +03:00
fab8474ef8
test: add CompactionSleepInterval in FakeStore's config
...
After setting the ComparionSleepInterval, we can use time.Ticker
instead of time.After to optimize the scheduleComparison(),
otherwise it will fail in the 'TestStoreCompact(t)' test.
Signed-off-by: guozhao <guozhao@360.cn >
2023-01-20 06:25:09 +08:00
de8d6b3792
etcdserver: use time.Ticker instead of time.After
...
Using time.After will create a new Timer in each cycle, In these cases
, it is better to use time.Ticker.
Signed-off-by: guozhao <guozhao@360.cn >
2023-01-17 16:58:13 +08:00
a3925d1ed6
Merge pull request #15129 from ahrtr/bump_dependency_20230117
...
Bump some dependencies
2023-01-17 07:16:46 +08:00
ac98432f0b
dependency: bump github.com/dustin/go-humanize from v1.0.0 to v1.0.1
...
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2023-01-17 06:37:19 +08:00
8ed20e85d2
etcdserver: return membership.ErrIDNotFound when the memberID not found
...
When promoting a learner, we need to wait until the leader's applied ID
catches up to the commitId. Afterwards, check whether the learner ID
exist or not, and return `membership.ErrIDNotFound` directly in the API
if the member ID not found, to avoid the request being unnecessarily
delivered to raft.
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2023-01-17 06:18:15 +08:00
ef917f1efd
Merge pull request #15068 from ahrtr/last_wal_rec_corrupt_main_20220107
...
etcdserver: process the case of the last WAL record being partially synced to disk [backport 3.5]
2023-01-11 18:06:46 +08:00
30fc7611e2
tidy up dependencies
...
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2023-01-10 09:11:34 +08:00
d104408036
build(deps): bump golang.org/x/net from 0.4.0 to 0.5.0 in /server
...
Bumps [golang.org/x/net](https://github.com/golang/net ) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/golang/net/releases )
- [Commits](https://github.com/golang/net/compare/v0.4.0...v0.5.0 )
---
updated-dependencies:
- dependency-name: golang.org/x/net
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-01-10 09:10:07 +08:00
bd9f1584d4
process the scenaro of the last WAL record being partially synced to disk
...
We need to return io.ErrUnexpectedEOF in the error chain, so that
etcdserver can repair it automatically.
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2023-01-08 04:46:51 +08:00
2c46b2b299
externalize snapshot catchup entries to etcd flag
...
Signed-off-by: Chao Chen <chaochn@amazon.com >
2023-01-04 19:01:07 -08:00
8ec3cbc551
fixup! Add --raw mode to ./etcd-dump-log
...
Signed-off-by: Piotr Tabor <ptab@google.com >
2022-12-30 09:22:39 +01:00
e571fb7baa
Add --raw mode to ./etcd-dump-log
...
This mode allows to look at RAW protos for all entries in WAL logs in the given directory.
Signed-off-by: Piotr Tabor <ptab@google.com >
2022-12-30 09:22:34 +01:00
58681d3feb
Expose types of entries within the WAL log for access from the tools.
...
Signed-off-by: Piotr Tabor <ptab@google.com >
2022-12-30 09:19:23 +01:00
0d8aad54ba
wal: Expose Decoder as package visible interface.
...
Such that can be used by tools.
Signed-off-by: Piotr Tabor <ptab@google.com >
2022-12-30 09:19:23 +01:00
bee2a08968
wal decoding: Add optional mode to ignore CRC errors.
...
Signed-off-by: Piotr Tabor <ptab@google.com >
2022-12-30 09:19:23 +01:00
498619bdda
wal decoder: report file & offset in case of CRC mismatch.
...
Signed-off-by: Piotr Tabor <ptab@google.com >
2022-12-30 09:19:23 +01:00
9abc895122
Goimports: Apply automated fixing to test files as well.
...
Signed-off-by: Piotr Tabor <ptab@google.com >
2022-12-29 13:04:45 +01:00
6f899a7b40
Merge pull request #15052 from ptabor/20221228-goimports-fix
...
./scripts/fix.sh: Takes care of goimports across the whole project.
2022-12-29 11:31:22 +01:00
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
4d0b91947e
chore: delete // +build buildtag by go fix
...
Signed-off-by: Wei Fu <fuweid89@gmail.com >
2022-12-29 14:17:05 +08:00
101a2a61ea
etcdserver: fix typo in comment
...
etcdserver: fix typo in comment
2022-12-28 18:41:08 +08:00
04a75b10bf
Merge pull request #14875 from BarrensZeppelin/patch-lessor
...
lease: fix potential goroutine leak in lessor_test.go
2022-12-19 09:28:50 +01:00
2ffa9e7c91
tests(etcdserver): refactor
...
Signed-off-by: wafuwafu13 <mariobaske@i.softbank.jp >
2022-12-16 10:09:04 +09:00
8dcfca0097
tests(etcdserver): add server_access_control_test.go
...
Signed-off-by: wafuwafu13 <mariobaske@i.softbank.jp >
2022-12-15 21:46:48 +09:00
c4f7ac28a2
deps: bump go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc from 0.32.0 to 0.37.0 in /server
...
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2022-12-14 04:32:18 +08:00
32840bae73
deps: bump go.opentelemetry.io/otel from 1.7.0 to 1.11.2
...
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2022-12-14 04:27:04 +08:00
8f320bfa00
deps: bump github.com/golang-jwt/jwt/v4 from 4.4.2 to 4.4.3 in /server
...
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2022-12-14 04:19:10 +08:00
2c192f4205
deps: bump go.uber.org/multierr from 1.8.0 to 1.9.0 in /server
...
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2022-12-14 04:00:49 +08:00
c2a7a5870d
deps: bump github.com/prometheus/client_golang from 1.12.2 to 1.14.0
...
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2022-12-14 03:42:11 +08:00
bc41c0963b
deps: bump github.com/coreos/go-systemd/v22 from 22.3.2 to 22.5.0
...
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2022-12-14 03:38:55 +08:00
259a73d67a
deps: bump github.com/spf13/cobra from 1.4.0 to 1.6.1
...
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2022-12-14 03:33:24 +08:00
1a0af6fee6
deps: bump go.uber.org/zap from 1.21.0 to 1.24.0
...
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2022-12-14 03:33:24 +08:00
1ba246e1d8
bump golang.org/x/ to v0.4.0
...
Found 1 known vulnerability.
Vulnerability #1 : GO-2022-1144
An attacker can cause excessive memory growth in a Go server
accepting HTTP/2 requests. HTTP/2 server connections contain a
cache of HTTP header keys sent by the client. While the total
number of entries in this cache is capped, an attacker sending
very large keys can cause the server to allocate approximately
64 MiB per open connection.
Call stacks in your code:
Error: tools/etcd-dump-metrics/main.go:158:5: go.etcd.io/etcd/v3/tools/etcd-dump-metrics.main calls go.etcd.io/etcd/server/v3/embed.StartEtcd, which eventually calls golang.org/x/net/http2.Server.ServeConn
Found in: golang.org/x/net/http2@v0.2.0
Fixed in: golang.org/x/net/http2@v0.4.0
More info: https://pkg.go.dev/vuln/GO-2022-1144
Error: Process completed with exit code 3.
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2022-12-09 08:54:48 +08:00
f59896c735
chore: use Getter in WarnOfExpensiveReadOnlyTxnRequest
...
The pb provides an accessor method to get field and it will not panic if
the owner is nil. And add non-empty RangeRespone into the test case.
Signed-off-by: Wei Fu <fuweid89@gmail.com >
2022-12-07 17:54:52 +08:00
daad3a2154
etcdserver: fix nil pointer panic for readonly txn
...
FYI. https://github.com/etcd-io/etcd/issues/14891#issuecomment-1337191993
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2022-12-06 14:53:47 +08:00