16042 Commits

Author SHA1 Message Date
Benjamin Wang
61002209fc
Merge pull request #16842 from chaochn47/release-3.4-grpc-dialer
Backport [3.4] clientV3: simplify grpc dialer usage. Remove workaround #11184 after bumping grpc to 1.26.0.
2023-10-27 20:38:25 +01:00
yoyinzyc
03f79003d4 clientV3: simplify grpc dialer usage. Remove workaround #11184 after bumping grpc to 1.26.0.
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-27 12:10:54 -07:00
Marek Siarkowicz
d152339b5b
Merge pull request #16826 from chaochn47/release-3.4-authenticate
[3.4] Backport clientv3:get AuthToken gracefully without dialing gRPC with balancer API to get extra connection
2023-10-27 14:15:02 +02:00
Benjamin Wang
5801fbdccf
Merge pull request #16834 from ahrtr/3.4_bump_bbolt_1.3.8_20231026
[3.4] Bump bbolt to 1.3.8 for release-3.4
2023-10-27 09:57:56 +01:00
Benjamin Wang
452e4cc0a9 Bump bbolt to 1.3.8 for etcd 3.4
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-10-26 16:36:50 +01:00
CFC4N
3181b44d76 clientv3: get AuthToken gracefully without extra connection.
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-25 12:51:30 -07:00
CFC4N
0cf5a72c2a credentials: let GetRequestMetadata() return nil when authToken isn't initialized.
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-25 12:51:30 -07:00
CFC4N
1fc259d655 etcdserver: check authinfo if it is not InternalAuthenticateRequest.
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-25 12:51:30 -07:00
Benjamin Wang
e031012f74
Merge pull request #16800 from chaochn47/release-3.4-clientv3-naming-impl
[3.4] Backport clientv3 naming implementation
2023-10-25 20:11:02 +01:00
Chao Chen
e61f1d886b [3.4] backport 12675: Cleanup grpc clientv3/naming API
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-24 09:17:32 -07:00
Chao Chen
7c4696a7e8 [3.4] backport 12669: Implement Endpoint Watch and new Resolver
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-24 08:57:33 -07:00
Chao Chen
15d6a11e14 [3.4] backport 12667: Implement Update method for EndpointManager
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-24 08:10:00 -07:00
Marek Siarkowicz
3fd498809d
Merge pull request #16795 from chaochn47/release-3.4-grpc-update
[3.4]  Upgrade grpc-go to 1.29.1 and Backport "Introduce grpc-1.30+ compatible client/v3/naming API."
2023-10-24 09:52:22 +02:00
Piotr Tabor
6c0e4d97f1 Introduce grpc-1.30+ compatible client/v3/naming API.
This is not yet implementation, just API and tests to be filled
with implementation in next CLs,
tracked by: https://github.com/etcd-io/etcd/issues/12652

We propose here 3 packages:
 - clientv3/naming/endpoints ->
    That is abstraction layer over etcd that allows to write, read &
    watch Endpoints information. It's independent from GRPC API. It hides
    the storage details.

 - clientv3/naming/endpoints/internal ->
    That contains the grpc's compatible Update class to preserve the
    internal JSON mashalling format.

 - clientv3/naming/resolver ->
   That implements the GRPC resolver API, such that etcd can be
   used for connection.Dial in grpc.

Please see the grpc_naming.md document changes & grpcproxy/cluster.go
new integration, to see how the new abstractions work.

Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-19 12:59:24 -07:00
Benjamin Wang
3663ae13fe
Merge pull request #16782 from serathius/roundrobin-3.4
[3.4] Return to default write scheduler since golang.org/x/net@v0.11.0 started using round robin
2023-10-17 13:07:28 +01:00
Bogdan Kanivets
2c527b2aad tests: increase maxWatchDelay to prevent flaky TestWatchDelay*
value is selected empirically after spot checking some logs of flaky workflows

fixes: https://github.com/etcd-io/etcd/issues/15634
Signed-off-by: Bogdan Kanivets <bkanivets@apple.com>
2023-10-17 11:16:52 +02:00
Marek Siarkowicz
9606263da0 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-17 11:16:51 +02:00
Benjamin Wang
52b3a39a04
Merge pull request #16746 from dusk125/3.4-http2
[3.4] Bump golang.org/x/net to v0.17.0
2023-10-12 14:25:33 +01:00
Benjamin Wang
e30e2e522c
Merge pull request #16744 from ahrtr/go1.20.10_20231011_3.4
[3.4] bump golang version to 1.20.10
2023-10-11 19:59:52 +01:00
Allen Ray
cd3e26101b Bump golang.org/x/net to v0.17.0
Signed-off-by: Allen Ray <alray@redhat.com>
2023-10-11 11:16:42 -04:00
Benjamin Wang
68504586bd bump golang version to 1.20.10
Address CVE-2023-44487
https://github.com/advisories/GHSA-qppj-fm5r-hxr3

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-10-11 16:05:13 +01:00
Benjamin Wang
48b0c2bd93
Merge pull request #16732 from 0scvr/0scvr/upgrade-r3.4-go-1.20.9
[3.4] etcd: upgrade go version to 1.20.9 in Makefile & scripts
2023-10-10 12:35:52 +01:00
Oscar
e0147abbec etcd: upgrade go version to 1.20.9 in Makefile & scripts
Signed-off-by: Oscar <5xp395ab@duck.com>
2023-10-10 11:06:00 +00:00
Benjamin Wang
5451f8144d
Merge pull request #16729 from 0scvr/0scvr/upgrade-r3.4-go-1.20.9
[3.4] Upgrade go version to 1.20.9
2023-10-10 09:48:48 +01:00
0scvr
a824bd46db etcd: upgrade go version to 1.20.9
To be up to date with the newest security fixes.

Signed-off-by: 0scvr <71343264+0scvr@users.noreply.github.com>
2023-10-09 23:31:04 +02:00
Benjamin Wang
3253d5ceb4
Merge pull request #16556 from ahrtr/3.4_golang_20230908
[3.4] dependency: bump golang to 1.20.8
2023-09-08 18:32:40 +01:00
Benjamin Wang
a79e37290a dependency: bump golang to 1.20.8
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-08 17:52:43 +01:00
Benjamin Wang
e35bf9d957
Merge pull request #16558 from fuweid/34-backport-16268
[3.4] pkg/ioutil: deflake TestPageWriterRandom
2023-09-08 17:27:03 +01:00
Wei Fu
939a440d6b pkg/ioutil: deflake TestPageWriterRandom
The PageWriter has cache buffer so that it doesn't call the Writer until
the cache is almost full. Since the data's length is random, the pending
bytes should be always less than cache buffer size, instead of page
size.

Fix: #16255

Signed-off-by: Wei Fu <fuweid89@gmail.com>
(cherry picked from commit fddd1add52b33649a99d7f756404924138344a10)
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-08 23:56:13 +08:00
Marek Siarkowicz
420669a504
Merge pull request #16406 from jmhbnz/backport-update-to-go-1.20
[3.4] Backport update to golang 1.20 minor release
2023-08-17 12:54:41 +02:00
James Blair
4db260134f
Backport update to golang 1.20 minor release.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-08-13 16:02:29 +12:00
Benjamin Wang
7655708927
Merge pull request #16368 from jmhbnz/streamline-test-commands
[3.4] Backport Makefile recipes for common test commands
2023-08-04 16:25:14 +01:00
James Blair
74a148e625
Update workflows to use makefile recipes for unit, integration & e2e-release.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-08-04 10:04:56 +12:00
James Blair
ff4c49b7c3
Backport Makefile recipes for common test commands.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-08-04 10:04:45 +12:00
Benjamin Wang
08401f8dec
Merge pull request #16353 from z764969689/release-3.4
Backport "bump go version to 1.19.12" to release-3.4
2023-08-02 09:49:29 +01:00
Luke Zhang
674b00b8b7 bump go version to 1.19.12
Signed-off-by: Luke Zhang <z764969689@163.com>
2023-08-02 15:33:47 +08:00
Benjamin Wang
e8c6c9304f
Merge pull request #16309 from gocurr/release-3.4
[3.4] Backport #16272 to 3.4
2023-07-27 09:03:55 +01:00
Jes Cok
137cc0332f pkg/flags: fix UniqueURLs'Set to remove duplicates in UniqueURLs'uss
From the name of func 'UniqueURLsFromFlag', we can tell that UniqueURLs'uss
should not have duplicates. The current implemention of UniqueURLs'Set
has a bug to make it unique. This PR fixes it.

Signed-off-by: Jes Cok <xigua67damn@gmail.com>
2023-07-26 20:17:17 +08:00
Benjamin Wang
05d7c10043
Merge pull request #16240 from liangyuanpeng/backport_13577_3.4
[3.4] Backport #13577 to 3.4
2023-07-14 16:09:26 +01:00
Benjamin Wang
81755115bf
Merge pull request #16202 from kensou97/release-3.4
[3.4] clientv3: create keepAliveCtxCloser goroutine only if ctx can be canc…
2023-07-14 13:46:54 +01:00
Benjamin Wang
31f12a8031
Merge pull request #16228 from ahrtr/go_3.4_20230712
[3.4]Bump go version to 1.19.11 to fix CVE GO-2023-1878
2023-07-14 11:14:03 +01:00
Lan Liang
47cef60ac4 Backport #13577
Disable auth gracefully without impacting existing watchers.

Signed-off-by: Lan Liang <gcslyp@gmail.com>
2023-07-14 12:48:22 +08:00
Benjamin Wang
2745dc67b2 bump go version to 1.19.11 to fix CVE GO-2023-1878
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-07-12 16:57:02 +01:00
Benjamin Wang
c92fb80f39 bump version to 3.4.27
Signed-off-by: Benjamin Wang <wachao@vmware.com>
v3.4.27
2023-07-11 09:52:08 +01:00
Marek Siarkowicz
f836291efa
Merge pull request #16195 from fuweid/fix-panic-for-http-only
[3.4] embed: fix nil pointer dereference when stopServer
2023-07-11 09:02:39 +02:00
zhangwenkang
30426eb755 clientv3: create keepAliveCtxCloser goroutine only if ctx can be canceled
Signed-off-by: zhangwenkang <zwenkang@vmware.com>
2023-07-10 23:08:23 +08:00
Wei Fu
15efc55905 tests/e2e: allow to use SIGTERM to verify graceful-stop
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-07-07 21:28:51 +08:00
Wei Fu
66713f69af embed: fix nil pointer dereference when stopServer
Since v3.4.25, ETCD server introduces http-only urls flag to expose
gRPC-only endpoints. When user enables this feature, the stopServer will
panic during terminating. If the server is leader, it won't have chance
to transfer the leadership.

```
Jul 07 14:43:04  etcd[11502]: received terminated signal, shutting down...
Jul 07 14:43:04  etcd[11502]: WARNING: 2023/07/07 14:43:04 grpc: addrConn.createTransport failed to connect to {0.0.0.0:2379  <nil> 0 <nil>}. Err :connection error: desc = "transport: Error while dialing dial tcp 0.0.0.0:2379: connect: connection refused". Reconnecting...Jul 07 14:43:04  etcd[11502]: WARNING: 2023/07/07 14:43:04 grpc: addrConn.createTransport failed to connect to {0.0.0.0:2379  <nil> 0 <nil>}. Err :connection error: desc = "transport: Error while dialing dial tcp 0.0.0.0:2379: connect: connection refused". Reconnecting...
Jul 07 14:43:04  etcd[11502]: panic: runtime error: invalid memory address or nil pointer dereference                                                                                                                                                                           Jul 07 14:43:04  etcd[11502]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x130 pc=0x9ccd45]
Jul 07 14:43:04  etcd[11502]: goroutine 225 [running]:
Jul 07 14:43:04  etcd[11502]: google.golang.org/grpc.(*Server).Stop(0x0)
Jul 07 14:43:04  etcd[11502]:         /home/fuwei/go/pkg/mod/google.golang.org/grpc@v1.26.0/server.go:1390 +0x45
Jul 07 14:43:04  etcd[11502]: go.etcd.io/etcd/embed.stopServers.func1()
Jul 07 14:43:04  etcd[11502]:         /home/fuwei/go/src/go.etcd.io/etcd/embed/etcd.go:431 +0x3c
Jul 07 14:43:04  etcd[11502]: go.etcd.io/etcd/embed.stopServers({0x115a558, 0xc000278b70}, 0xc00024f248)
Jul 07 14:43:04  etcd[11502]:         /home/fuwei/go/src/go.etcd.io/etcd/embed/etcd.go:438 +0x7d
Jul 07 14:43:04  etcd[11502]: go.etcd.io/etcd/embed.(*Etcd).Close(0xc0004d6600)
Jul 07 14:43:04  etcd[11502]:         /home/fuwei/go/src/go.etcd.io/etcd/embed/etcd.go:392 +0x835
Jul 07 14:43:04  etcd[11502]: go.etcd.io/etcd/pkg/osutil.HandleInterrupts.func1()
Jul 07 14:43:04  etcd[11502]:         /home/fuwei/go/src/go.etcd.io/etcd/pkg/osutil/interrupt_unix.go:70 +0x284
Jul 07 14:43:04  etcd[11502]: created by go.etcd.io/etcd/pkg/osutil.HandleInterrupts
Jul 07 14:43:04  etcd[11502]:         /home/fuwei/go/src/go.etcd.io/etcd/pkg/osutil/interrupt_unix.go:53 +0xce
Jul 07 14:43:04  systemd[1]: etcd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
```

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-07-07 21:28:06 +08:00
Marek Siarkowicz
4e800bdc66
Merge pull request #16193 from wenjiaswe/cp
[3.4] Adding optional revision bump and mark compacted to snapshot restore
2023-07-07 09:36:53 +02:00
Wenjia
44e59b18a6 Update clientv3/snapshot/v3_snapshot.go
Co-authored-by: Benjamin Wang <wachao@vmware.com>
Signed-off-by: Wenjia Zhang <wenjiazhang@google.com>
2023-07-06 23:46:17 -07:00