1488 Commits

Author SHA1 Message Date
Marek Siarkowicz
451eb5d711 tests: Make using bridge optional 2021-09-29 12:42:14 +02:00
Marek Siarkowicz
f2dd5d80a1 tests: Rename grpcAddr to grpcURL to imply that it includes schema 2021-09-28 16:45:06 +02:00
Marek Siarkowicz
391d662f77 tests: Remove bridge dependency on unix 2021-09-28 16:45:06 +02:00
Arda Güçlü
65686efa4a Decouple prefixArgs from os.Env dependency
prefixArgs uses os.Setenv in e2e tests instead envMap.
This creates overwrites in some test cases and have an impact
on test quality and isolation between tests.
This PR uses ctlcontext envMap in each tests with high priority
and merges os environment variables with low priority.
2021-09-13 12:28:56 +03:00
Marek Siarkowicz
0d15ff57e6 server: Implement schema migrations 2021-09-10 10:16:48 +02:00
leoyang.yl
ad69fe0f40 fix IsOptsWithFromKey
fix IsOptsWithFromKey

fix IsOptsWithFromKey

fix IsOptsWithFromKey

fix IsOptsWithFromKey

fix IsOptsWithFromKey
2021-09-10 00:44:52 +08:00
Eduardo Patrocinio
87f1dc7e40 Fix a few typos 2021-09-03 16:09:09 -04:00
Manuel Rüger
c9b4c866ce Cleanup remaining TODOs for/past 3.5 release 2021-08-06 13:29:25 +02:00
Piotr Tabor
873f3691f1
Merge pull request #13216 from serathius/wal
Annotate proto messages with version and detect etcd version generated the wal
2021-08-06 10:58:57 +02:00
Marek Siarkowicz
b4b50f7852 etcdutl: Implement migrate --force command
Co-authored-by: nic-chen <33000667+nic-chen@users.noreply.github.com>
Co-authored-by: Heisenberg <yuzhiquanlong@gmail.com>
2021-08-04 17:58:18 +02:00
Marek Siarkowicz
1b4e54c238 api: Annotate proto messages and use it to detect etcd version that generated wal
Co-authored-by: Lili Cosic <cosiclili@gmail.com>
2021-08-04 13:36:08 +02:00
Piotr Tabor
1e46145b29
Merge pull request #13268 from serathius/storage-min
Move storage bootstrap dependencies to storage package
2021-08-03 17:28:36 +02:00
Sahdev Zala
1da6c71321
Merge pull request #13256 from Haimantika/replacejwtgo
Replace github.com/form3tech-oss/jwt-go with https://github.com/golang-jwt/jwt
2021-08-03 10:17:43 -04:00
Marek Siarkowicz
83a325ac46 server: Move all functions needed for storage bootstrap to storage package
This is prerequestite to move storage bootstrap, splitted to separate PR
to make it easier to review.
2021-08-03 13:09:15 +02:00
Marek Siarkowicz
44b8ae145b etcdserver: Move datadir and wal to storage package 2021-08-03 12:47:37 +02:00
Haimantika Mitra
c10d50c4b3 Replace github.com/form3tech-oss/jwt-go with https://github.com/golang-jwt/jwt
Signed-off-by: Haimantika Mitra <haimantikamitra@gmail.com>

Made required adjustments to the go.sum file

Signed-off-by: Haimantika Mitra <haimantikamitra@gmail.com>

Changed go.sum file in the server directory

Signed-off-by: Haimantika Mitra <haimantikamitra@gmail.com>

Removed the white space

Signed-off-by: Haimantika Mitra <haimantikamitra@gmail.com>

Made required changes

Signed-off-by: Haimantika Mitra <haimantikamitra@gmail.com>

Trying to fix the fails

Signed-off-by: haimantika mitra <haimantikamitra@gmail.com>

Removed error

Signed-off-by: haimantika mitra <haimantikamitra@gmail.com>

Fixed bill-of-materials.json file

Signed-off-by: haimantika mitra <haimantikamitra@gmail.com>

Changed go.mod with recent version

Signed-off-by: haimantika mitra <haimantikamitra@gmail.com>

Newer version changes

Signed-off-by: haimantika mitra <haimantikamitra@gmail.com>

Changes to etcdutl directory

Signed-off-by: haimantika mitra <haimantikamitra@gmail.com>
2021-08-03 13:49:47 +05:30
Sam Batschelet
da34e9bf30
Merge pull request #13245 from serathius/makefile
*: Cleanup Makefile
2021-08-02 10:24:33 -04:00
Marek Siarkowicz
7b5f8fc71c *: Cleanup Makefile
* Move manual docker tests to ./tests/manual
* Move manual docker makefile targets to ./tests/manual/Makefile
* Remove unused makefile rules
2021-07-27 17:32:39 +02:00
Alexey Roytman
2a26f7ae4c
etcdserver: configure "expensive" requests duration
When a unary request takes more than predefined duration, this request
is defined as "expensive" and a warning is printed. The expensive request
duration is hard-coded to 300 ms. It can be not enough for example
for transactions with a lot of operations. The warnings just blow up
the log files and reduce throughput.

This fix allows user to configure the "expensive" request duration.

Signed-off-by: Alexey Roytman <roytman@il.ibm.com>
2021-07-27 08:33:44 +03:00
Marek Siarkowicz
5e40a8b00c server: Create storage package and move mvcc files to it 2021-07-12 15:37:21 +02:00
Marek Siarkowicz
e21cf4ef02 tkest: Prevent TestMaintenanceSnapshotWithVersionVersion & TestSaveSnapshotVersion from flaking
When running 100 times in row those tests flaked around 10-20%. Based on
some experimentation 10 keys was enough to ensure that wal snapshot is
created and prevented any flakes.
2021-07-09 13:38:40 +02:00
Sahdev Zala
0d0b6f06fa
Merge pull request #13142 from avorima/etcdutl-completion
etcdutl: add command to generate shell completion
2021-06-30 10:33:22 -04:00
Marek Siarkowicz
e2740b4afa server,etcdutl: Preserve etcd version in backend allowing etcdutl to read it from snapshot 2021-06-25 14:06:56 +02:00
Piotr Tabor
8f9829cd2d
Merge pull request #13114 from lilic/fix-api-version
Bump etcd version to 3.5.0 and 3.6.0-pre
2021-06-24 14:26:17 +02:00
Mario Valderrama
3c6ace066a etcdutl: add command to generate shell completion
Follow up of #13133.
2021-06-24 12:22:40 +02:00
Mario Valderrama
96b8049d81 Write test for for bash completion 2021-06-23 23:16:47 +02:00
Lili Cosic
4e060dc127 tests/e2e/ctl_v3_snapshot_test.go: Adjust version to 3.6.0 2021-06-22 12:26:24 +02:00
Lili Cosic
df696a7e76 go.mod: Bump etcd to 3.5.0 2021-06-22 12:25:39 +02:00
Piotr Tabor
5564476831
Merge pull request #13073 from serathius/snapshot-version
[Version in Snapshot] SnapshotResponse includes local etcd version
2021-06-21 16:56:00 +02:00
Marek Siarkowicz
e1b1d93548 *: Snapshot returns local etcd version
Co-authored-by: Lili Cosic <cosiclili@gmail.com>
2021-06-14 16:36:50 +02:00
Lili Cosic
16477a8270 Update client_golang dependency to v1.11.0 2021-06-07 14:49:57 +02:00
J. David Lowe
8552d8ec20 etcdserver: don't activate alarm w/missing AlarmType
Narrowly prevent etcd from crashing when given a bad ACTIVATE payload, e.g.:

$ curl -d "{\"action\":\"ACTIVATE\"}" ${ETCD}/v3/maintenance/alarm
curl: (52) Empty reply from server
2021-06-04 12:18:56 -07:00
Piotr Tabor
b00803a9c1
Merge pull request #13071 from serathius/genproto
tests: Switch regenerating functional/rpcpb proto to scripts/genproto.sh
2021-06-04 13:30:02 +02:00
Piotr Tabor
404efd70f7 Upgrade of prometheous deps.
For now we need to depend on unstable: prometheus/client_golang
2021-06-03 16:07:01 +02:00
Piotr Tabor
edcfe575cf Update dependencies:
- github.com/coreos/go-systemd/v22 v22.3.2
  - github.com/google/btree v1.0.1
  - github.com/json-iterator/go v1.1.11
  - github.com/mattn/go-runewidth v0.0.13
  - github.com/prometheus/client_golang v1.10.0
  - github.com/prometheus/common v0.26.0
  - github.com/sirupsen/logrus v1.8.1
2021-06-03 13:03:01 +02:00
Piotr Tabor
b240625d21 Update bbolt to v1.3.6.
`./scripts/update_dep.sh go.etcd.io/bbolt v1.3.6`
2021-06-03 12:39:53 +02:00
Piotr Tabor
90cea7d4e7 Update zap to v1.17.0. 2021-06-03 12:37:43 +02:00
Marek Siarkowicz
af5cf1ac1c tests: Switch regenerating functional/rpcpb proto to scripts/genproto.sh 2021-06-02 16:42:35 +02:00
Piotr Tabor
4c6c506575
Merge pull request #13063 from serathius/integration-defer
integration: Use subtests to defer cluster.Terminate call
2021-06-01 17:19:05 +02:00
Piotr Tabor
c15af6df03
Merge pull request #13058 from ptabor/20210531-functional-test-logging
Improve output of the 'functional' tests
2021-06-01 16:09:03 +02:00
Marek Siarkowicz
d669eb038d integration: Use subtests to defer cluster.Terminate call
This fixes cases where Terminate is not called due to t.Fatal call
2021-06-01 15:59:02 +02:00
Marek Siarkowicz
182aef6e6b etcdserver: Fix invalid count returned on Range with Limit 2021-06-01 15:04:28 +02:00
Piotr Tabor
ea8b9e6c18 Improve output of the 'functional' tests
- Use go testing infrastructure, such that logs are printed only in
case of failure.
 - Split the test into multiple sub-round and sub-round-testcases such
   that tree of execution reflects the logic.
 - Use 'development' loggers that are formatting the output to be human
readable.
2021-05-31 15:31:48 +02:00
Piotr Tabor
f15e0b8237 integration.BeforeTest can be run without leak-detection. 2021-05-27 20:55:11 +02:00
Piotr Tabor
bda32db121 Expose clientv3.CreateDefaultZapLoggerConfig
Need raised in
f3f4259d3f.

BTW: Alligned the implementation of grpclogs with what we use in embed
server, so reduced the client code dependencies.
2021-05-25 22:59:08 +02:00
赵延
64b01a7a8d
Enhance the root permission, when root role exist, it always return rootPerm. (#13006)
etcdctl role grant-permission root readwrite foo.
see etcdctl role get root output.
Before:
Role root
KV Read:
        foo
KV Write:
        foo
After:
Role root
KV Read:
        [, <open ended>
KV Write:
        [, <open ended>
2021-05-24 14:58:00 -07:00
Pavan BG
d9c5e1f0a2 *: Replace internal testutil AssertEqual function in favour of github.com/stretchr/testify/assert.Equals
To maintain uniformity in testing methodology, assert.Equals has been used everywhere while replacing testutil.AssertEqual

Fixes #13015
2021-05-20 19:55:45 +05:30
Lili Cosic
b23ab1f759 tests/functional: Require same version of protoc everwhere
The main genproto.sh script requires latest version, this confirms the
test protoc to do the same.
2021-05-20 13:41:41 +02:00
Lili Cosic
fe2a9bd7e9 Update go.mod and go.sum files after running scripts 2021-05-20 13:41:41 +02:00
Lili Cosic
cb8c0a0507 tests/functional/rpcpb/rpc.pb.go: Regenerate
run ./scripts/genproto.sh
2021-05-20 13:41:41 +02:00