478 Commits

Author SHA1 Message Date
Marek Siarkowicz
0452feec71 version: bump up to 3.5.3 2022-04-13 17:17:51 +02:00
Danielle Lancashire
50978d5b25 clientv3: disable mirror auth test with proxy 2022-04-13 12:41:24 +00:00
Danielle Lancashire
5d44f2242f 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-13 12:39:06 +00:00
ahrtr
bc5307de95 support linearizable renew lease
When etcdserver receives a LeaseRenew request, it may be still in
progress of processing the LeaseGrantRequest on exact the same
leaseID. Accordingly it may return a TTL=0 to client due to the
leaseID not found error. So the leader should wait for the appliedID
to be available before processing client requests.
2022-04-12 14:12:45 +08:00
Marek Siarkowicz
383eceb885
Merge pull request #13669 from maxsokolovsky/upgrade-server-dependency-golang.org/x/crypto
etcdserver: upgrade the golang.org/x/crypto dependency
2022-04-09 09:44:05 +02:00
Marek Siarkowicz
238b18c110
Merge pull request #13895 from mrueg/rel3.5-client_golang
[release-3.5] go.mod: Upgrade to prometheus/client_golang v1.11.1
2022-04-07 09:38:43 +02:00
Manuel Rüger
3b8c6512df go.mod: Upgrade to prometheus/client_golang v1.11.1 2022-04-06 00:35:48 +02:00
Marek Siarkowicz
a060b42e47 server: Use default logging configuration instead of zap production one
This fixes problem where logs json changes format of timestamp.
2022-04-01 12:23:44 +02:00
Marek Siarkowicz
25556a08a8 tests: Keeps log in expect to allow their analysis 2022-04-01 12:23:14 +02:00
Marek Siarkowicz
39baf36ca3
Merge pull request #13726 from chaochn47/backport_13676_to_3_5
backport 3.5: #13676 load all leases from backend
2022-03-08 10:40:28 +01:00
Piotr Tabor
3c2ef71358
Merge pull request #13727 from ahrtr/3.5_print_raft_term_in_decimal
[3.5] Always print raft term in decimal when displaying member list in json
2022-02-25 08:59:52 +01:00
leoyang.yl
7cec92a281 *: fix IsOptsWithFromKey
porting back from 3.5 from main
PR #13334
2022-02-23 16:42:00 -08:00
Chao Chen
f634b44046 backport 3.5: #13676 load all leases from backend 2022-02-22 10:21:04 -08:00
ahrtr
7345d4211b always print raft_term in decimal when displaying member list in json 2022-02-22 17:09:21 +08:00
Max Sokolovsky
f4708ae3d4 etcdserver: upgrade the golang.org/x/crypto dependency
To rectify the vulnerability found in a version of golang.org/x/crypto
(https://avd.aquasec.com/nvd/cve-2020-29652), upgrade the dependency to
its latest version.
Alternatively, version v0.0.0-20201216223049-8b5274cf687f could be used,
where the fixed was introduced, but the latest is preferable.
2022-02-07 10:11:46 -05:00
Marek Siarkowicz
99018a77be version: bump up to 3.5.2 2022-02-01 12:28:34 +01:00
Marek Siarkowicz
d00e89db2e server: Require either cluster version v3.6 or --experimental-enable-lease-checkpoint-persist to persist lease remainingTTL
To avoid inconsistant behavior during cluster upgrade we are feature
gating persistance behind cluster version. This should ensure that
all cluster members are upgraded to v3.6 before changing behavior.

To allow backporting this fix to v3.5 we are also introducing flag
--experimental-enable-lease-checkpoint-persist that will allow for
smooth upgrade in v3.5 clusters with this feature enabled.
2021-12-02 16:54:10 +01:00
Michał Jasionowski
eddfb4232f etcdserver,integration: Store remaining TTL on checkpoint
To extend lease checkpointing mechanism to cases when the whole etcd
cluster is restarted.
2021-12-02 16:42:20 +01:00
Michał Jasionowski
21634a98c6 lease,integration: add checkpoint scheduling after leader change
Current checkpointing mechanism is buggy. New checkpoints for any lease
are scheduled only until the first leader change. Added fix for that
and a test that will check it.
2021-12-02 16:40:14 +01:00
Sam Batschelet
d42e8589e1 version: 3.5.1
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-10-03 11:47:37 -04:00
Marek Siarkowicz
79f9a45574 client: Use first endpoint as http2 authority header 2021-09-30 12:15:33 +02:00
Marek Siarkowicz
7f25a500e3 tests: Add grpc authority e2e tests 2021-09-30 12:15:33 +02:00
Marek Siarkowicz
58d2b12a50 client: Add grpc authority header integration tests 2021-09-30 12:15:32 +02:00
Marek Siarkowicz
6e04e8ae42 tests: Allow configuring integration tests to use TCP 2021-09-30 12:05:25 +02:00
Marek Siarkowicz
7272a9585d test: Use unique number for grpc port 2021-09-30 12:05:15 +02:00
Marek Siarkowicz
0bac49bda4 tests: Cleanup member interface by exposing Bridge directly 2021-09-30 12:05:10 +02:00
Marek Siarkowicz
f324894e8f tests: Make using bridge optional 2021-09-30 12:05:04 +02:00
Marek Siarkowicz
994bd08723 tests: Rename grpcAddr to grpcURL to imply that it includes schema 2021-09-30 12:04:57 +02:00
Marek Siarkowicz
c1f48d8077 tests: Remove bridge dependency on unix 2021-09-30 12:04:50 +02:00
Arda Güçlü
6e2fe84ebd 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-30 12:04:31 +02:00
Sam Batschelet
946a5a6f25 version: 3.5.0
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-06-15 17:34:52 -04:00
Sam Batschelet
8139dd3e55 version: 3.5.0-rc.1
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-06-09 17:57:52 -04:00
Lili Cosic
9fee8bf95e Update client_golang dependency to v1.11.0 2021-06-07 15:54:57 +02:00
J. David Lowe
ae194c1470 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 14:21:04 -07:00
Sam Batschelet
ab20aa29a0 version: 3.5.0-rc.0
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-06-03 21:39:37 -04:00
Piotr Tabor
a5523be415 Update of dependencies:
- zap-1.17.0
  - bbolt-1.3.6
  - grpc -1.38
  - github.com/coreos/go-systemd/v22 v22.3.2
  - github.com/google/btree v1.0.1
  - github.com/json-iterator/go v1.1.11
2021-06-03 15:19:33 +02:00
Marek Siarkowicz
9a18742bd7 etcdserver: Fix invalid count returned on Range with Limit 2021-06-01 16:12:53 +02:00
Sam Batschelet
6cd7c02873
Merge pull request #13055 from ptabor/20210528-beckport-integration-fixes 2021-05-30 16:35:15 -04:00
Piotr Tabor
3f13d3a2d5 integration.BeforeTest can be run without leak-detection. 2021-05-28 10:01:36 +02:00
Piotr Tabor
4af7fc393c 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-26 12:52:46 +02:00
Sam Batschelet
b3f16d6691 version: 3.5.0-beta.4
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-05-25 20:48:48 -04:00
Sam Batschelet
379c361bc6 version: 3.5.0-beta.3
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-05-18 09:44:35 -04:00
Sam Batschelet
1a8a063a31 version: 3.5.0-beta.2
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-05-18 06:32:19 -04: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