Lili Cosic
13bf7b0766
tests/functional: Set socket-reuse-port and socket-reuse-address
...
Due to flakes in CI and locally which resulted due to shared servers
there is suspcion that fixed port numbers are to blame. This reuses port
and address.
2021-05-20 13:41:41 +02:00
horizonzy
6ab56fc237
enhance GetRole output when role is 'root' and the response perm is nil.
...
Before output:
Role root
KV Read:
KV Write:
After output:
Role root
KV Read:
[, <open ended>
KV Write:
[, <open ended>
2021-05-19 17:35:13 +08:00
Piotr Tabor
3dd577ec08
Simplify client's logger configuration in tests.
2021-05-18 13:03:16 +02:00
Piotr Tabor
d99d0df5a5
Adding etcdutl test coverage.
2021-05-17 11:54:03 +02:00
Piotr Tabor
c09aca1ba4
Split etcdctl into etcdctl (public API access) & etcdutl (direct surgery on files)
...
Motivation is as follows:
- etcdctl we only depend on clientv3 APIs, no dependencies of bolt, backend, mvcc, file-layout
- etcdctl can be officially supported across wide range of versions, while etcdutl is pretty specific to file format at particular version.
it's step towards desired modules layout, documented in: https://etcd.io/docs/next/dev-internal/modules/
2021-05-17 11:54:03 +02:00
Piotr Tabor
f82b5cb776
Bring back original NewZapCoreLoggerBuilder api. ( #12973 )
...
The funcion signature has been changed in:
eafbc8c57efc716644c328f63677ca7eadeebdfe .
Instead we should have added new method `NewZapLoggerBuilder()`.
2021-05-16 10:26:10 -07:00
Piotr Tabor
099fd65821
Fix coverage test failure: e2e TestIssue6361.
...
Tested with:
```
(cd tests && COVERDIR='../../c' 'env' 'go' 'test' '-tags=cov' '-timeout' '30m' 'go.etcd.io/etcd/tests/v3/e2e' -run TestIssue6361 -v 2>&1 | tee log.log)
```
2021-05-16 10:58:41 +02:00
Piotr Tabor
c7a76470d5
Fix path to the coverage folder for e2e tests.
2021-05-16 09:49:50 +02:00
Piotr Tabor
13ef6fc343
Fix coverage tests
...
2 problems:
- spawnCmdWithLogger was not implemented (when built with 'cov' tag)
- the logic was depending on relative paths. We change it to absolute
to be able to run in the test-specific temporary directories.
2021-05-16 09:49:50 +02:00
Piotr Tabor
3ed0cb1dfc
Update modules to more stable versions. ( #12975 )
2021-05-15 23:32:27 -07:00
Piotr Tabor
c18010cf42
etcdproxy e2e tests should run in dedicated directories.
...
So far all proxies were sharing the same (current) directory,
leading to tests flakes, e.g. due to certificates being overriden
in autoTLS mode.
2021-05-14 22:42:31 +02:00
Piotr Tabor
582d02e7f5
E2E tests should log commandlines used to spawn etcd or etcd proxy binaries.
2021-05-14 22:42:31 +02:00
Piotr Tabor
00c6090110
Refactor common code from etcdctl (v2,v3) to pkg/corbautl.
...
Preparation for etcdutl split.
2021-05-14 14:16:53 +02:00
Gyuho Lee
e2d67f2e3b
Merge pull request #12956 from gyuho/rename-to-main
...
*: rename "master" branch references to "main" in source code
2021-05-13 08:26:33 -07:00
Gyuho Lee
19fcefae70
tests: rename "master" branch references to "main"
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2021-05-12 10:38:12 -07:00
Piotr Tabor
79e3d7bd3e
Add e2e tests for --v2-deprecation flag.
2021-05-12 19:20:49 +02:00
Piotr Tabor
ead81df948
Disallow -v2-deprecation>'not-yet' combined with --enable-v2
2021-05-12 18:09:34 +02:00
Piotr Tabor
7ba53c71a9
Merge pull request #12953 from serathius/e2e-split
...
github actions: Move e2e to separate workflow and remove semaphoreci
2021-05-12 14:55:28 +02:00
Marek Siarkowicz
f908e423bc
github actions: Move e2e to separate workflow and remove semaphoreci
2021-05-12 14:17:17 +02:00
Piotr Tabor
1929aa0a36
Merge pull request #12948 from serathius/logger
...
client: Allow setting zap logger in config
2021-05-12 13:49:48 +02:00
Marek Siarkowicz
06afe87b34
client: Allow setting zap logger in config
2021-05-12 12:15:20 +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
04c9e8b531
Run e2e tests with: EXPECT_DEBUG='true'
...
The motivation is need to diagnose flakes like:
https://semaphoreci.com/etcd-io/etcd/branches/pull-request-12940/builds/2 .
Now - when the logs are streamed through testing.T logger, the verbosity
is not that significant concern.
2021-05-10 17:46:31 +02:00
Lili Cosic
1a718a958e
Add initial Tracing with OpenTelemetry
2021-05-10 10:44:40 +02:00
Piotr Tabor
f5717016cf
Merge pull request #12797 from lzhfromustc/3_23
...
server/etcdmain and tests: Fix goroutine leaks
2021-05-10 08:29:17 +02:00
Piotr Tabor
aeb9b5fc73
Merge pull request #12855 from ptabor/20210409-backend-hooks
...
(no)StoreV2 (Part 4): Backend hooks: precommit updates consistency_index
2021-05-08 09:34:31 +02: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
Piotr Tabor
a78d072b9a
Simplify KVstore dependency on cindex.
2021-05-04 18:21:24 +02:00
Piotr Tabor
3acf6e35b2
Finish migration zap.NewExample -> zaptest.NewLogger(t) in integration tests
2021-04-29 22:32:26 +02:00
Piotr Tabor
451f65d661
Merge pull request #12908 from ptabor/20210429-client-retry-logging
...
Clientv3 (retry interceptor) logs should use the configured logger
2021-04-29 19:25:04 +02:00
Piotr Tabor
cedbea6c81
Merge pull request #12904 from wpedrak/limit_mlocked_memory
...
server: replace mlockall with `Mlock` in `--experimental-memory-mlock`
2021-04-29 18:21:24 +02:00
Piotr Tabor
ffea1537d4
ClientV3 tests use integration.NewClient that configures proper logger.
2021-04-29 18:18:34 +02:00
wpedrak
927b3a3152
server: replace mlockall with Mlock
in --experimental-memory-mlock
...
Implementation of `--experimental-memory-mlock` backed by `mlockall` syscall is replaced by `Mlock` flag (backed by mlock syscall) of bboltDB.
2021-04-29 12:08:20 +02:00
Piotr Tabor
f53b70facb
Embed: In case KVStoreHash verification fails, close the backend.
...
In case of failed verification, the server used to keep opened backend
(so the file was locked on OS level).
2021-04-29 11:51:25 +02:00
Piotr Tabor
2ad893b110
Integrate verification into e2e tests.
2021-04-29 11:51:24 +02:00
Piotr Tabor
c4b13a5c83
Integrate verification framework
...
Verification framework is integrated with:
- integration tests (by default)
- `ETCD_VERIFY=all etcdctl snapshot restore` command
- etcd shutdown when running with `ETCD_VERIFY=all` env.
2021-04-28 07:56:16 +02:00
Piotr Tabor
4725567d5e
e2e tests: More logging and expect adopted to 3.4.
2021-04-27 17:17:31 +02:00
Gyuho Lee
c4f7d578d8
Merge pull request #12898 from tangcong/add-disk-io-failure-case
...
functional: add disk io failure case
2021-04-26 14:37:53 -07:00
tangcong
4fb22093a6
functional: add SHORT_TTL_LEASE_EXPIRE checker
2021-04-26 20:00:45 +08:00
tangcong
16e38e49a9
functional: add FAILPOINTS_WITH_DISK_IO_LATENCY case
2021-04-26 12:07:05 +08:00
tangcong
370f9cf3b9
fix: failed to get failpoints from member
2021-04-26 11:44:53 +08:00
Piotr Tabor
9a3aff6d8f
Merge pull request #12889 from ptabor/20210423-deflake-TestFirstCommitNotification
...
Deflake: TestFirstCommitNotification
2021-04-23 14:55:44 +02:00
Piotr Tabor
9f559775b8
Deflake: TestFirstCommitNotification
...
Infrequently the test flaked. Reproducable with:
```
go test go.etcd.io/etcd/tests/v3/integration --run TestFirstCommitNotification --count=500
```
The moveLeader finishes when configchange is commited by quorum.
It doesn't guarantee that the 'empty' record was committed by the new leader.
From time to time happened that appliedLeaderIndex was returning 9
(without empty entry) and the test flaked. In healthy case the
appliedIndex returned 10.
Fixed by putting kv pair after leader change. The pair is guaranteed
to be stored on index when put finishes (so the empty entry as well).
2021-04-23 13:22:15 +02:00
Piotr Tabor
9a4b2bdccc
Errors: context cancelled
or context deadline exceeded
are exposed as codes.Canceled, codes.DeadlineExceeded instead of 'codes.Unknown'
2021-04-22 14:35:24 +02:00
Piotr Tabor
ea287dd9f8
Merge pull request #12854 from ptabor/20210410-shouldApplyV3
...
(no)StoreV2 (Part 3): Applying consistency fix: ClusterVersionSet (and co) might get not applied on v2store
2021-04-21 09:31:38 +02:00
Piotr Tabor
3423a949c0
Update go for 3.5: 1.15 -> 1.16.(3).
...
https://github.com/etcd-io/etcd/issues/12732
2021-04-19 16:50:54 +02:00
Piotr Tabor
fad6391745
Configure proper logging for grpc integration tests.
2021-04-14 12:47:38 +02:00
Piotr Tabor
d72f7ef5cc
Give control to Embedded servers whether they override global loggers
...
So far each instance of embed server was overriding the grpc loggers and zap.global loggers.
It's counter intutitive that last created Embedded server was 'wining' and more-over it was breaking grpc expectation to change it "only" before the grpc stack is being used.
This PR introduces explicit call: `embed.Config::SetupGlobalLoggers()`, that changes the loggers where requested. The call is used by etcd main binary.
The immediate benefit from this change is reduction of test flakiness, as there were flakes due to not a proper logger being used across tests.
2021-04-14 12:47:38 +02:00
Piotr Tabor
eafbc8c57e
Update zap logging dependency.
...
In particular bring up zapgrpc V2 code:
89e382035d
https://pkg.go.dev/google.golang.org/grpc/grpclog#LoggerV2
2021-04-14 12:15:48 +02:00