Commit Graph

592 Commits (e9900f6fff2c8ddcb173075fe2d845b312c908ad)

Author SHA1 Message Date
Benjamin Wang 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
Benjamin Wang 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
Benjamin Wang 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
Benjamin Wang d11cc9e651
Merge pull request #14922 from ramil600/target-endpoint
resolver: cleanup of deprecated grpc resolver target.Endpoint field
2022-12-14 03:24:20 +08:00
Ramil Mirhasanov 932cb95e37 resolver: cleanup of deprecated grpc resolver target.Endpoint field
target.Endpoint and some other fields are deprecated, URL field is
suggested to use instead
path is required to be stripped of "/" prefix for naming/resolver to
work porperly

Signed-off-by: Ramil Mirhasanov <ramil600@yahoo.com>
2022-12-13 08:39:26 +03:00
Benjamin Wang d0e753ca86 clientv3: define local variables errMsgGRPCInvalidAuthToken and errMsgGRPCAuthOldRevision to cache gRPC error messages
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-13 07:28:59 +08:00
Benjamin Wang 19dc0cb413 client: enhance the function shouldRetryWatch and added unit test
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-13 06:05:02 +08:00
Benjamin Wang 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
Benjamin Wang 3f86db5e53 bump golang.org/x imports to address CVEs
Reference: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-32149

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-30 05:03:43 +08:00
Benjamin Wang cf171fdd1d
Merge pull request #14828 from ahrtr/identify_corrupted_member_20221123
Identify corrupted member depending on quorum
2022-11-29 06:08:25 +08:00
Wei Fu cd9ade5403 client/pkg/transport: fix typo in _test.go
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-11-27 22:10:06 +08:00
Wei Fu 8a88660262 client/pkg/transport: deflake TestWriteReadTimeoutListener
There is data race on `stop` channel. After verify write-timeout successfully,
the case won't wait for `blocker` to receive close signal from `stop` channel.
If the new `blocker`, which is to read-timeout verifier, get dial's result
immediately, the new `blocker` might fetch the message from `stop` channel
before old one and then close the connection, which causes that the
`conn.Read` returns `EOF` when it reads data.

How to reproduce this in linux devbox?

Use `taskset` to limit the test process in one-cpu.

```bash
cd ./client/pkg/transport
go test -c -o /tmp/test --race=true ./
taskset -c 0 /tmp/test -test.run TestWriteReadTimeoutListener -test.v -test.cpu 4 -test.count=10000 -test.failfast
```

To fix this, suggest to use seperate `stop` channel to prevent from data
race.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-11-27 22:06:11 +08:00
Benjamin Wang 8b98fee9ce etcdserver: detect corrupted member based on quorum
When the leader detects data inconsistency by comparing hashes,
currently it assumes that the follower is the corrupted member.
It isn't correct, the leader might be the corrupted member as well.

We should depend on quorum to identify the corrupted member.
For example, for 3 member cluster, if 2 members have the same hash,
the the member with different hash is the corrupted one. For 5 member
cluster, if 3 members have the same same, the corrupted member is one
of the left two members; it's also possible that both the left members
are corrupted.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-26 19:35:38 +08:00
Benjamin Wang 285e44378f bump github.com/stretchr/testify from v1.7.2 to v1.8.1
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-26 10:51:32 +08:00
Wei Fu cf285ea3c7 bump grpc to v1.51.0 from v1.47.0
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-11-23 22:16:22 +08:00
Andrew Sims f656fa0f49 add missing copyright headers
Signed-off-by: Andrew Sims <andrew.cameron.sims@gmail.com>
2022-11-23 19:13:43 +11:00
Abhishek Choudhary 0721d2f254
client: update comment for clarity
Signed-off-by: Abhishek Choudhary <shreemaan.abhishek@gmail.com>
2022-11-22 19:25:46 +05:30
Benjamin Wang 6d8139dcea
Merge pull request #14788 from sashamelentyev/imports
all: goimports -w .
2022-11-18 09:03:43 +08:00
Sasha Melentyev c3b6cbdb73 all: goimports -w .
Signed-off-by: Sasha Melentyev <sasha@melentyev.io>
2022-11-17 19:07:04 +03:00
cleverhu d726e9a183 docs: fix max recv msg size description
The correct param forMaxCallRecvMsgSize is '--max-recv-bytes' instead of '--max-request-bytes', so I fixed the documentation and description.

Signed-off-by: cleverhu <shouping.hu@daocloud.io>
2022-11-17 10:37:55 +08:00
Benjamin Wang f32ac6e069 clientv3: do not refresh token when using TLS CommonName based authentication
When users use the TLS CommonName based authentication, the
authTokenBundle is always nil. But it's possible for the clients
to get `rpctypes.ErrAuthOldRevision` response when the clients
concurrently modify auth data (e.g, addUser, deleteUser etc.).
In this case, there is no need to refresh the token; instead the
clients just need to retry the operations (e.g. Put, Delete etc).

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-16 18:31:53 +08:00
Benjamin Wang bf5c936ff1
Merge pull request #14731 from ramil600/grpc_withinsecure
client/v3: replace deprecated grpc.WithInsecure()  issue #14732
2022-11-16 06:41:29 +08:00
Sasha Melentyev 95c520976a client: Use func without format
Signed-off-by: Sasha Melentyev <sasha@melentyev.io>
2022-11-15 01:02:24 +03:00
Ramil Mirhasanov 44d8e732cf client/v3: replace deprecated grpc.WithInsecure()
Deprecated: use WithTransportCredentials and insecure.NewCredentials() instead. Will be supported throughout 1.x.

Signed-off-by: Ramil Mirhasanov <ramil600@yahoo.com>
2022-11-11 12:08:50 +03:00
chenyahui 5b8c6b548f etcdclient: check mutex state in Unlock method of concurrency.Mutex
Check the values of myKey and myRev first in Unlock method to prevent calling Unlock without Lock. Because this may cause the value of pfx to be deleted by mistake.

Signed-off-by: chenyahui <cyhone@qq.com>
2022-11-08 22:24:52 +08:00
Benjamin Wang b08209447a
Merge pull request #14368 from happlins/main
clientv3: fix init client error
2022-11-07 06:36:13 +08:00
Benjamin Wang 7f46da223d client: no need to getToken when dial specific endpoint for maintenance
The existing client may connect to different endpoint from the
specific endpoint to be maintained. Maintenance operations do not
go through raft at all, so it might run into issue if the server
hasn't finished applying the authentication request.

Let's work with an example. Assuming the existing client connects to
ep1, while the user wants to maintain ep2. If we getToken again, it
sends an authentication request, which goes through raft. When the
specific endpoint receives the maintenance request, it might haven't
finished previous authentication request, but the new token is already
carried in the context, so it will reject the maintenance request
due to invalid token.

We already have retry logic in `unaryClientInterceptor` and
`streamClientInterceptor`. When the token expires, it can automatically
refresh the token, so it should be safe to remove the `getToken`
logic in `maintenance.dial`

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-03 04:39:42 +08:00
Benjamin Wang a1018dbddf
Merge pull request #14604 from ahrtr/double_barrier
clientv3: fix the implementation of double barrier
2022-10-31 08:13:12 +08:00
jianfei.zhang d75d1e575a fix: close conn
Signed-off-by: jianfei.zhang <jianfei.zhang@daocloud.io>
2022-10-27 11:09:14 +08:00
Benjamin Wang 62167d1f1f clientv3: fix the design & implementation of double barrier
Check the client count before creating the ephemeral key, do not
create the key if there are already too many clients. Check the
count after creating the key again, if the total kvs is bigger
than the expected count, then check the rev of the current key,
and take action accordingly based on its rev. If its rev is in
the first ${count}, then it's valid client, otherwise, it should
fail.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-10-20 16:24:20 +08:00
happlins 8a587447d2 clientv3: fix errors init client RejectOldCluster
Signed-off-by: happlins <happlins@foxmail.com>
2022-10-13 17:24:24 +08:00
Benjamin Wang 1d77b4bd32
Merge pull request #14556 from tomari/tomari/watch-backoff
client/v3: Add backoff before retry when watch stream returns unavailable
2022-10-13 02:10:25 +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
Hisanobu Tomari 428fb9623a client/v3: Add backoff before retry when watch stream returns unavailable
The client retries connection without backoff when the server is gone
after the watch stream is established. This results in high CPU usage
in the client process. This change introduces backoff when the stream is
failed and unavailable.

Signed-off-by: Hisanobu Tomari <posco.grubb@gmail.com>
2022-10-08 06:57:30 +09:00
Chao Chen 8d057ea2b8 common tests framework: cluster client creation fail with invalid auth
Signed-off-by: Chao Chen <chaochn@amazon.com>
2022-09-29 23:09:32 -07:00
Kafuu Chino f1d4935e91 *: avoid closing a watch with ID 0 incorrectly
Signed-off-by: Kafuu Chino <KafuuChinoQ@gmail.com>

add test
2022-09-26 20:30:33 +08:00
Benjamin Wang 7f10dccbaf Bump go 1.19: update all the dependencies and go.sum files
1. run ./scripts/fix.sh;
2. cd tools/mod; gofmt -w . & go mod tidy;

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-22 08:47:46 +08:00
Benjamin Wang cd0b1d0c66 Bump go 1.19: upgrade go version to 1.19 in all go.mod files
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-22 08:47:46 +08:00
Marek Siarkowicz 026794495f
Merge pull request #14494 from demoManito/remove/redundant-type-conversion
etcd: remove redundant type conversion
2022-09-21 11:34:19 +02:00
Benjamin Wang 2441a24cee
Merge pull request #14493 from demoManito/style/format-import-order
etcd: format import order
2022-09-21 06:03:31 +08:00
demoManito f67ec10779 etcd: format import order
golang CodeReviewComments:
https://github.com/golang/go/wiki/CodeReviewComments#imports

Signed-off-by: demoManito <1430482733@qq.com>
2022-09-20 18:41:39 +08:00
demoManito a9c3d56508 etcd: remove redundant type conversion
Signed-off-by: demoManito <1430482733@qq.com>
2022-09-20 11:26:02 +08:00
Benjamin Wang 159ed15afc
Merge pull request #14479 from demoManito/fix/declaring-empty-slice
etcd: modify declaring empty slices
2022-09-20 05:22:59 +08:00
Hitoshi Mitake c793f18238
Merge pull request #14322 from mitake/watch-auth-err
*: handle auth invalid token and old revision errors in watch
2022-09-19 23:33:49 +09:00
Hitoshi Mitake 2dcfa83094 *: handle auth invalid token and old revision errors in watch
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
2022-09-17 21:51:36 +09:00
Sahdev Zala cdf4228673
Merge pull request #14308 from dusk125/main
server/etcdmain: add configurable cipher list to gRPC proxy listener
2022-09-16 12:15:08 -04:00
demoManito 5b26fc0101 fix test
Signed-off-by: demoManito <1430482733@qq.com>
2022-09-16 17:08:29 +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 47d460b8dc add verification on nil log
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-13 17:11:36 +08:00
Babis Kaidos 0eb642c4d9 Mockserver can handle requests to the leases API
This should allow clients using the leases API to perform UTs.

Fixes #14426

Signed-off-by: Babis Kaidos <babis_k@outlook.com>
2022-09-06 18:48:51 +03:00
Allen Ray c52108942b
Merge branch 'main' into main 2022-08-29 12:07:27 -04:00
Justin Kolberg 295044fba2
clientv3: close streams after use in lessor keepAliveOnce method
Streams are now closed after being used in the lessor `keepAliveOnce` method.
This prevents the "failed to receive lease keepalive request from gRPC stream"
message from being logged by the server after the context is cancelled by the
client.

Signed-off-by: Justin Kolberg <amd.prophet@gmail.com>
2022-08-17 18:02:13 -07: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
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
Chao Chen d4778e78c8 more logging around auto sync
Signed-off-by: Chao Chen <chaochn@amazon.com>
2022-08-10 18:00:06 -07:00
Benjamin Wang b2726c4da3
Merge pull request #12469 from trawler/client_listen_unix_socket
pkg/types: Support Unix sockets in NewURLS
2022-08-09 06:40:31 +08:00
QianChenglong 8e1e118fea clientv3: fix --insecure-skip-tls-verify not working when not specify --cert-path and --key-path
Fixes 14315

Signed-off-by: QianChenglong <qian_cheng_long@163.com>
2022-08-08 16:24:12 +08:00
Benjamin Wang f6cfd465cc No need to manually remove tmp directory created by t.TempDir()
The temporary directory created by t.TempDir() can be automatically removed by
the golang testing utilities. So no need to remove it manually.

FYI.

    https://github.com/golang/go/blob/go1.16.15/src/testing/testing.go#L911-L915
    https://github.com/golang/go/blob/go1.16.15/src/testing/testing.go#L957

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-21 08:20:52 +08:00
Benjamin Wang 16c10d6910
Merge pull request #14203 from Jille/patch-1
clientv3: Fix parsing of ETCD_CLIENT_DEBUG
2022-07-14 05:54:04 +08:00
Jille Timmermans ac3f913dad Improve error message for incorrect values of ETCD_CLIENT_DEBUG
Signed-off-by: Jille Timmermans <jille@quis.cx>
2022-07-13 18:55:51 +02:00
Jille Timmermans e3fd58df46 clientv3: Fix parsing of ETCD_CLIENT_DEBUG
It checked `err == nil` rather than `err != nil`.

Signed-off-by: Jille Timmermans <jille@quis.cx>
2022-07-10 11:21:15 +02:00
sky li (李少凯)-浪潮数据 c4e89b4186 Fix syntax errors in comments
Signed-off-by: sky li (李少凯)-浪潮数据 <lishaokai1995@126.com>
2022-07-08 09:48:13 +08:00
Sahdev Zala 8637c54bcc Client: fix check for WithPrefix op
Make sure that WithPrefix correctly set the flag, and add test.
Also, add test for WithFromKey.

fixes #14056

Signed-off-by: Sahdev Zala <spzala@us.ibm.com>
2022-06-29 17:52:05 -04:00
chavacava 0887d9acf1 fix #14161
Signed-off-by: chavacava <salvadorcavadini+github@gmail.com>
2022-06-25 10:09:05 +00: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 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 ccf477d12b restrict the max size of each WAL entry to the remaining size of the file
Currently the max size of each WAL entry is hard coded as 10MB. If users
set a value > 10MB for the flag --max-request-bytes, then etcd may run
into a situation that it successfully processes a big request, but fails
to decode it when replaying the WAL file on startup.

On the other hand, we can't just remove the limitation, because if a
WAL entry is somehow corrupted, and its recByte is a huge value, then
etcd may run out of memory. So the solution is to restrict the max size
of each WAL entry as a dynamic value, which is the remaining size of
the WAL file.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-06-17 05:41:49 +08:00
Benjamin Wang d23917c576 Add FileReader and FileBufReader utilities
The FileReader interface is the wrapper of io.Reader. It provides
the fs.FileInfo as well. The FileBufReader struct is the wrapper of
bufio.Reader, it also provides fs.FileInfo.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-06-16 15:32:16 +08:00
ahrtr 4fc9721fa6 provide a generic assert function 2022-05-13 10:50:19 +08:00
Marek Siarkowicz d58f971895 tests: Use zaptest.NewLogger in places we missed 2022-05-06 12:23:20 +02:00
ahrtr fb2eeb9027 verify consistent_index in snapshot must be equal to the snapshot index
Usually the consistent_index should be greater than the index of the
latest snapshot with suffix .snap. But for the snapshot coming from the
leader, the consistent_index should be equal to the snapshot index.
2022-05-03 20:02:47 +08:00
Marek Siarkowicz d849269dab
Merge pull request #13986 from Sea-n/fix-md
doc: Fix Markdown code block
2022-04-25 13:01:29 +02:00
Sean Wei 6d133aaf6a doc: Fix Markdown code block 2022-04-25 15:06:38 +08:00
Piotr Tabor d69e07dd3a Verification framework and check whether cindex is not decreasing. 2022-04-22 12:32:05 +02:00
Jordan Liggitt f07745a21c Add unit test for canonical SRV records 2022-04-18 08:48:42 -04:00
Jordan Liggitt d02a5363b3 Revert "trim the suffix dot from the srv.Target for etcd-client DNS lookup"
This reverts commit 5fc0092c87.
2022-04-18 08:48:42 -04:00
ahrtr 0dae4b3b1e rollback the opentelemetry bumpping to recover the pipeline failures 2022-04-14 16:13:28 +08:00
Will Beason eab1e0c5d5 go.mod: upgrade opentelemetry deps
Downstream users of etcd experience build issues when using dependencies
which require more recent (incompatible) versions of opentelemetry. This
commit upgrades the dependencies so that downstream users stop
experiencing these issues.
2022-04-13 07:14:10 -07:00
Danielle Lancashire e324cc1cbe cv3/mirror: Fetch the most recent prefix revision
When a user sets up a Mirror with a restricted user that doesn't have
access to the `foo` path, we will fail to get the most recent revision
due to permissions issues.

With this change, when a prefix is provided we will get the initial
revision from the prefix rather than /foo. This allows restricted users
to setup sync.
2022-04-11 13:42:03 +00:00
Sahdev Zala 0c9a4e0f93
Merge pull request #13837 from chrisayoub/main
clientv3: filter learner members during autosync
2022-04-09 19:00:55 -04:00
Marek Siarkowicz 7d3ca1f516
Merge pull request #13906 from donalhunt/main
*: drop use of humanize.Time() in favour of zap.Duration and time.Duration
2022-04-08 23:41:50 +02:00
Donal Hunt 6e1afa9677
Update client/v3/snapshot/v3_snapshot.go
Co-authored-by: Marek Siarkowicz <marek.siarkowicz@protonmail.com>
2022-04-08 18:44:50 +01:00
Marek Siarkowicz 05e6527d26
Merge pull request #13756 from serathius/test-snapshot
tests: Add tests for snapshot compatibility and recovery between versions
2022-04-08 14:14:19 +02:00
Donal Hunt 4c8ef011e0 *: drop use of humanize.Time() in favour of time.Duration.String()
humanize.Time() drops precision resulting in some events reporting they took
"now" time to complete. Using time.Duration.String() results in accurate
duration being reported.

Fixes #13905
2022-04-07 23:24:35 +01:00
Manuel Rüger f0f77fc14e go.mod: Bump prometheus/client_golang to v1.12.1
Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2022-04-06 19:03:24 +02:00
Marek Siarkowicz 3ffa253516 tests: Add tests for snapshot compatibility and recovery between versions 2022-04-06 16:10:38 +02:00
Piotr Tabor 68f2cb8c77 Fix ExampleAuth from integration/clientv3/examples (on OsX)
The code now ensures that each of the test is running in its own directory as opposed to shared os.tempdir.
```
$  (cd tests && env go test -timeout=15m --race go.etcd.io/etcd/tests/v3/integration/clientv3/examples -run ExampleAuth)
2022/04/03 10:24:59 Running tests (examples): ...
2022/04/03 10:24:59 the function can be called only in the test context. Was integration.BeforeTest() called ?
2022/04/03 10:24:59 2022-04-03T10:24:59.462+0200	INFO	m0	LISTEN GRPC	{"member": "m0", "grpcAddr": "localhost:m0", "m.Name": "m0"}
```
2022-04-03 14:16:45 +02:00
Piotr Tabor f85cd0296f
Merge pull request #13872 from ptabor/20220402-osx-unit-test-pass
Fix TestauthTokenBundleOnOverwrite on OsX:
2022-04-02 20:03:38 +02:00
Piotr Tabor 3b589fb3b2 Fix TestauthTokenBundleOnOverwrite on OsX:
```
% (cd client/v3 && env go test -short -timeout=3m --race ./...)
--- FAIL: TestAuthTokenBundleNoOverwrite (0.00s)
    client_test.go:210: listen unix /var/folders/t1/3m8z9xz93t9c3vpt7zyzjm6w00374n/T/TestAuthTokenBundleNoOverwrite3197524989/001/etcd-auth-test:0: bind: invalid argument
FAIL
FAIL	go.etcd.io/etcd/client/v3	4.270s
```

The reason was that the path exceeded 108 chars (that is too much for socket).
In the mitigation we first change chroot (working directory) to the tempDir... such the path is 'local'.
2022-04-02 16:12:02 +02:00
Marek Siarkowicz 63346bfead server: Use default logging configuration instead of zap production one
This fixes problem where logs json changes format of timestamp.
2022-04-01 10:23:42 +02:00
Chris Ayoub 125f3c3f9a clientv3: filter learners members during autosync
This change is to ensure that all members returned during the client's
AutoSync are started and are not learners, which are not valid
etcd members to make requests to.
2022-03-29 13:38:21 -04:00
Marek Siarkowicz 0d55a1ca2a
Merge pull request #13821 from ahrtr/configspec_config
Move the newClientCfg into clientv3 package so as to be reused by both etcdctl and v3discovery
2022-03-24 10:12:55 +01:00
ahrtr 49e9a14580 migrate unit test to cover the logic of converting ConfigSpec to Config 2022-03-24 07:24:22 +08:00
ahrtr f978da4f4f move the newClientCfg into clientv3 package so as to be reused by both etcdctl and v3discovery 2022-03-24 06:18:25 +08:00
eval-exec 8d01ac2816 remove endpoints length check in TestValidateSecureEndpoints() 2022-03-23 23:37:31 +08:00
EXEC ad78a74c42 Update client/pkg/transport/tls_test.go
Co-authored-by: Marek Siarkowicz <marek.siarkowicz@protonmail.com>
2022-03-23 23:37:31 +08:00
eval-exec 88e1d6b126 using subtests for TestValidateSecureEndpoints() 2022-03-23 23:37:31 +08:00