17042 Commits

Author SHA1 Message Date
Lili Cosic
7957f4461d server/embed/config_test.go: Add unit test for socket options 2021-05-20 10:00:27 +02:00
Lili Cosic
73c530de83 client,server: Expose reuse-port and reuse-address so they can be
configured via a config file.
2021-05-19 18:41:21 +02:00
Hitoshi Mitake
5f60e0d799
Merge pull request #12979 from horizonzy/enhance-role-output
Enhance getRole output when the role is 'root'.
2021-05-19 23:39:51 +09: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
159d1916fe
Merge pull request #12985 from ptabor/20210517-fix-not-a-learner-retries
Fix not retryable error codes from: Unavailable -> FailedPrecondition
2021-05-19 08:05:22 +02:00
Piotr Tabor
788bc5359d
Merge pull request #13000 from ptabor/20210519-shouldApplyV3
applyV2 should apply on backend only once
2021-05-19 02:09:36 +02:00
Piotr Tabor
16d51d8c26 Fix not retryable error codes from: Unavailable -> FailedPrecondition
- ErrGRPCNotCapable("etcdserver: not capable") -> codes.FailedPrecondition  (it will not autofix, it requires new version of server)
 - ErrGPRCNotSupportedForLearner("etcdserver: rpc not supported for learner") -> codes.FailedPrecondition (as long as its learner, the call will not work)
 - ErrGRPCClusterVersionUnavailable("etcdserver: cluster version not found during downgrade") -> codes.FailedPrecondition (backend does not contain the version (old etcd?) so retry will not help)

https://github.com/etcd-io/etcd/runs/2599598633?check_suite_focus=true

```
{"level":"warn","ts":"2021-05-17T09:55:30.246Z","logger":"etcd-client","caller":"v3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"etcd-endpoints://0xc000539880/#initially=[unix://localhost:m30]","attempt":0,"error":"rpc error: code = Unavailable desc = etcdserver: rpc not supported for learner"}
{"level":"warn","ts":"2021-05-17T09:55:30.270Z","logger":"etcd-client","caller":"v3/retry_interceptor.go:62","msg":"retrying
of unary invoker
failed","target":"etcd-endpoints://0xc000539880/#initially=[unix://localhost:m30]","attempt":1,"error":"rpc
error: code = Unavailable desc = etcdserver: rpc not supported for
learner"}`
```
2021-05-19 02:08:53 +02:00
Piotr Tabor
0a972a3f05 applyV2 should reapply on backend only once
During review of:  https://github.com/etcd-io/etcd/pull/12988 spotted
that PUT is actially writing to v3-backend.
If we are replaying WAL log, it might happened that backend's
applied_index is > than the WAL's log entry. In such situation we should
skip applying on backend V3.
I think both the methods (setVersion, setMembersAttributes) are in
practice idempotent so its not that 'serious' problem, but for
formal correctness adding the proper checks.
2021-05-18 20:55:05 +02:00
Piotr Tabor
46b49a6ecf
Merge pull request #12991 from ptabor/20210519-mlmhl-buffer-seq
Represent bucket as object instead of []byte name.
2021-05-18 19:32:01 +02:00
Piotr Tabor
66752fef2f Represent bucket as object instead of []byte name.
Thanks to this change:
  - all the maps bucket -> buffer are indexed by int's instead of
string. No need to do: byte[] -> string -> hash conversion on each
access.
  - buckets are strongly typed in backend/mvcc API.
2021-05-18 18:58:53 +02:00
Sam Batschelet
80ccb27ea5
Merge pull request #12997 from hexfusion/fix-etcdutl-build
scripts: add missing etcdutl to release pipeline
2021-05-18 07:36:22 -04:00
Piotr Tabor
fe829fa461
Merge pull request #12995 from ptabor/20210519-simplify-loggers
Simplify client's logger configuration in tests.
2021-05-18 13:22:47 +02:00
Sam Batschelet
86393ecfcd scripts: add missing etcdutl to release pipeline
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-05-18 07:16:28 -04:00
Piotr Tabor
3dd577ec08 Simplify client's logger configuration in tests. 2021-05-18 13:03:16 +02:00
Piotr Tabor
62b731909f
Merge pull request #12587 from mlmhl/buffer-search
backend: fix buffer range bug
2021-05-18 10:54:30 +02:00
Gyuho Lee
6d451ab61d
Merge pull request #12989 from gyuho/workflow
github/workflow: run arm64 tests for all branches startin from 3.5
2021-05-17 14:58:22 -07:00
Gyuho Lee
41b325a711 github/workflow: run arm64 tests for all branches startin from 3.5
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2021-05-17 13:46:30 -07:00
Gyuho Lee
1af7cb22f2
Merge pull request #12988 from chaochn47/updateClusterVersionV2
use v2 api to update cluster version
2021-05-17 13:43:36 -07:00
Chao Chen
8e9b77a2c7 Update CHANGELOG-3.5.md 2021-05-17 11:46:14 -07:00
Chao Chen
783c5ad2d2 use v2 api to update cluster version 2021-05-17 11:45:54 -07:00
Piotr Tabor
e73facb7e2
Merge pull request #12986 from ptabor/20210519-mlmhl-buffer-seq
Reset 'seq' flags between transactions and track per 'bucket'
2021-05-17 20:31:00 +02:00
Piotr Tabor
eebe67d87d Rename seq to bucket2seq. 2021-05-17 17:29:44 +02:00
Piotr Tabor
4a2ffc2cbe Minor formatting fix on top of https://github.com/etcd-io/etcd/pull/12568 2021-05-17 17:08:00 +02:00
mlmhl
79eafb9719 backend: set seq flag for each bucket buffer 2021-05-17 17:08:00 +02:00
Piotr Tabor
932d42b027
Merge pull request #12971 from ptabor/20210514-split-etcdctl
Split etcdctl into etcdctl (public API access) & etcdutl (direct surgery on files)
2021-05-17 14:07:20 +02:00
Piotr Tabor
3f7a038656 Fixed documentation and scripts. 2021-05-17 11:54:03 +02:00
Piotr Tabor
949c1c224b Updated changelog. 2021-05-17 11:54:03 +02:00
Piotr Tabor
d99d0df5a5 Adding etcdutl test coverage. 2021-05-17 11:54:03 +02:00
Piotr Tabor
b6a8ae8372 add etcdutl version. make it cov-tests compatible. 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
1675101293
Merge pull request #12981 from ptabor/20210516-fix-release-script
Fix release script: add `go mod tidy` after go.mod changes
2021-05-17 11:35:21 +02:00
Piotr Tabor
2712c787ab Fix release script: add go mod tidy
Seems that additinal refresh of go.sum files is needed during the
release process after editing the versions of modules.

Discovered the problem while I was testing whether etcdutl is
properly included in the target binaries using:

```
DRY_RUN=true REPOSITORY=\`pwd\` BRANCH='branch-with-etcdutl' ./scripts/release 3.5.0-foobar.2
```
2021-05-16 20:43:12 +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
9501e8e874
Merge pull request #12980 from aaronjheng/typo
Fix typo in CHANGELOG
2021-05-16 16:18:46 +02:00
Aaron Jheng
549a0f656f
docs: Fix typo in CHANGELOG 2021-05-16 21:44:57 +08:00
Piotr Tabor
adcf580137
Merge pull request #12976 from ptabor/20210516-fix-coverage
Fix coverage tests
2021-05-16 15:27:38 +02: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
Patrice Chalin
bca0717f28
Rename master to main in README and other *.md files (#12977) 2021-05-15 23:46:05 -07:00
Piotr Tabor
3ed0cb1dfc
Update modules to more stable versions. (#12975) 2021-05-15 23:32:27 -07:00
Piotr Tabor
a6be38306a
Merge pull request #12974 from ptabor/20210515-fix-to-testing-env
Fixes to CI configs
2021-05-15 17:24:35 +02:00
Piotr Tabor
27c74398cd Fixes to CI configs.
- Moves grpcproxy & functional tests to a separate workflows such thay can get restarted independently.
- Configures travis to run 1.16.3 go version (as travis cannot resolve 1.16 to the default).
2021-05-15 16:50:28 +02:00
Piotr Tabor
85341e08f2
Merge pull request #12968 from serathius/logger-simplify
server: Simplify passing logger setup by passing only logger
2021-05-15 15:58:00 +02:00
Piotr Tabor
ddc4f473c9
Merge pull request #12965 from ptabor/20210513-flake-in-e2e-debugging
Fix flakes due to 'shared dir' in grpcproxy e2e tests
2021-05-15 13:21:12 +02:00
Piotr Tabor
d8550deb7f Fix pkg/proxy tests such that they don't leek goroutines and do close transports. 2021-05-14 22:45:59 +02:00
Piotr Tabor
8981afb6f5 Fix unit tests logging config. 2021-05-14 22:45:57 +02: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
f5c26814ab Loggers to catch the e2e flake. 2021-05-14 22:42:31 +02:00