1688 Commits

Author SHA1 Message Date
Marek Siarkowicz
87c8e8b868 test: Migrate to ClusterV3 cluster in integration tests 2022-01-20 14:10:09 +01:00
Marek Siarkowicz
69fc517e56 test: Add StrictReconfigCheck to cluster 2022-01-20 14:10:09 +01:00
Marek Siarkowicz
98242da5f1 test: Handle adding new members for clusters with TCP enabled 2022-01-20 14:10:09 +01:00
Marek Siarkowicz
5bcbf77980 tests: Move client to member struct 2022-01-20 14:10:09 +01:00
Piotr Tabor
fdd98477ef Update dep: require gopkg.in/yaml.v2 v2.2.8 -> v2.4.0 due to: CVE-2019-11254 2022-01-17 16:52:58 +01:00
Piotr Tabor
19cb0a4252
Merge pull request #13519 from ahrtr/enhance_make_mirror_command
Add a new flag "--rev" to make-mirror command to support incremental mirror
2022-01-15 17:02:12 +01:00
Piotr Tabor
1237b3576c
Merge pull request #13487 from mrueg/go-1.17.3
*: Bump to go 1.17.6
2022-01-15 17:01:17 +01:00
Piotr Tabor
b2f6ffdd81
Merge pull request #13595 from serathius/enable-v2
server: --enable-v2 and --enable-v2v3 is decomissioned
2022-01-15 16:48:29 +01:00
Piotr Tabor
f75549d53b
Merge pull request #13571 from yank1/update-cobra-version
Update Cobra version to 1.2.1
2022-01-14 14:54:28 +01:00
Marek Siarkowicz
ee5ef42c5c server: --enable-v2 and --enable-v2v3 is decomissioned 2022-01-14 13:19:30 +01:00
Marek Siarkowicz
eac6d71352 tests: Add integration test for revision monotonic under failure injection 2022-01-12 11:51:12 +01:00
Manuel Rüger
ce086a4ba6 *: Bump to go 1.17.6
Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2022-01-12 03:13:27 +01:00
Manuel Rüger
746c0ea276 tests/Dockerfile: Update base to ubuntu 21.10
Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2022-01-12 03:00:08 +01:00
Manuel Rüger
cf7e8b3535 go.mod: Bump golang.org/x/net dependency; regenerate go.sum
Bumps golang.org/x/net dependency due to fix CVE-2021-44716
as requested in https://github.com/etcd-io/etcd/pull/13487#issuecomment-997065540

Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2022-01-12 03:00:08 +01:00
Manuel Rüger
ce50f68166 *: Bump to go 1.17.5 2022-01-12 03:00:08 +01:00
Yap Sok Ann
17fd2e7282 Disable auth gracefully without impacting existing watchers
This attempts to fix a special case of the problem described in #12385,
where trying to do `clientv3.Watch` with an expired token would result
in `ErrGRPCPermissionDenied`, due to the failing authorization check in
`isWatchPermitted`. Furthermore, the client can't auto recover, since
`shouldRefreshToken` rightly returns false for the permission denied
error.

In this case, we would like to have a runbook to dynamically disable
auth, without causing any disruption. Doing so would immediately expire
all existing tokens, which would then cause the behavior described
above. This means existing watchers would still work for a period of
time after disabling auth, until they have to reconnect, e.g. due to a
rolling restart of server nodes.

This commit adds a client-side fix and a server-side fix, either of
which is sufficient to get the added test case to pass. Note that it is
an e2e test case instead of an integration one, as the reconnect only
happens if the server node is stopped via SIGINT or SIGTERM.

A generic fix for the problem described in #12385 would be better, as
that shall also fix this special case. However, the fix would likely be
a lot more involved, as some untangling of authn/authz is required.
2021-12-31 14:39:46 +07:00
Your Name
77bf0a5a9e update cobra version to 1.2.1
Signed-off-by: yankay <kay.yan@daocloud.io>
2021-12-29 17:35:25 +08:00
ahrtr
661e0a91ef added a new flag --rev to make-mirror command to support incremental mirror 2021-12-22 16:59:44 +08:00
Marek Siarkowicz
7d10899d7f 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 12:26:47 +01:00
Piotr Resztak
e24796e8eb e2e: Call WithStopSignal on proxyV2 object 2021-12-02 01:02:24 +01:00
Michał Jasionowski
fd77b2700c etcdserver,integration: Store remaining TTL on checkpoint
To extend lease checkpointing mechanism to cases when the whole etcd
cluster is restarted.
2021-11-26 15:17:22 +01:00
Michał Jasionowski
48a360aad0 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-11-26 14:34:19 +01:00
Kushal Pisavadia
71493bde3e *: Upgrade to use go.opentelemetry.io/otel@v1.2.0
Upgrading from v1.0.1.

Upgrading related dependencies
------------------------------

The following dependencies also had to be upgraded:

- go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.26.1
  From v0.25.0. This gets rid of a transitive dependency on go.opentelemetry.io/otel@v1.0.1.
- google.golang.org/genproto@v0.0.0-20211118181313-81c1377c94b1
2021-11-24 16:03:33 +00:00
Sam Batschelet
29c3b0f307
Merge pull request #13377 from hexfusion/add-learner-limit-flag
Add experimental-max-learners flag
2021-11-15 09:49:18 -05:00
Chao Chen
b5e4c2d3c4 client/v2: remove unsafe json-iterator/reflect2 2021-11-09 11:16:40 -08:00
Sam Batschelet
63a1cc3fe4 add --experimental-max-learner flag
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-11-09 09:52:00 -05:00
Piotr Tabor
6c2f5dc78a
Merge pull request #13405 from serathius/downgrade-b
Implement single node downgrades
2021-10-29 23:22:10 +02:00
Piotr Tabor
9c28e07588
Merge pull request #13447 from Juneezee/deprecate-ioutil
*: move from io/ioutil to io and os packages
2021-10-29 23:18:36 +02:00
Marek Siarkowicz
6c2be0822d tests: Add e2e tests for downgrades 2021-10-29 12:47:19 +02:00
Marek Siarkowicz
431adc5878 server: Implement storage downgrades
By validating if WAL doesn't include any incompatible entries we can
implement storage downgrades.
2021-10-29 12:47:19 +02:00
Marek Siarkowicz
f5d71fa389 server: Detect when WAL includes unapplied cluster version set to higher version
This is because etcd v3.5 will panic when it encounters
ClusterVersionSet entry with version >3.5.0. For downgrades to v3.5 to
work we need to make sure this entry is snapshotted.
2021-10-29 12:47:19 +02:00
Sam Batschelet
a0bdfc4fc9 tests/integration/clientv3: allow time for endpoints to update
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-10-27 17:26:30 -04:00
Sam Batschelet
316e62b4e1 *: fixup go 1.17 bump
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-10-27 14:26:55 -04:00
Eng Zer Jun
2a151c8982
*: move from io/ioutil to io and os packages
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2021-10-28 00:05:28 +08:00
Lili Cosic
e6e279a14d *: Bump go to go v1.17.2 2021-10-27 13:44:54 +02:00
Chao Chen
7b6554fd30 non mutating requests pass through quotaKVServer when NOSPACE 2021-10-22 16:36:37 -07:00
Piotr Tabor
ef1f71a9f6
Merge pull request #13411 from serathius/framework
Move e2e/integration cluster setup to separate package
2021-10-21 17:09:49 +02:00
Marek Siarkowicz
ca9b720c1d tests: Move integration setup to separa framework package 2021-10-20 10:34:35 +02:00
Marek Siarkowicz
dcd0d3fc9c tests: Extract e2e cluster setup to separate package 2021-10-19 13:06:40 +02:00
Vladimir Ermakov
49a8aa7f49
run fix.sh
To fix dependencies.

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>
2021-10-13 14:08:27 +03:00
Marek Siarkowicz
4bcdee5c65 tests: Extract flag init from main_test.go 2021-10-08 22:01:11 +02:00
Piotr Tabor
5b226e0abf
Merge pull request #13391 from serathius/downgrade-refactor
Refactor code to make place for downgrade logic
2021-10-08 12:38:25 +02:00
Marek Siarkowicz
703df1c491 server: Move wal versioning functions to wal package 2021-10-08 12:01:53 +02:00
Aleksandr Razumov
3644c9d67b
client/pkg/fileutil: add missing logger to {Create,Touch}DirAll
Also populate it to every invocation.
2021-10-07 17:53:59 +03:00
Marek Siarkowicz
c929a917b6 client: Use first endpoint as http2 authority header 2021-09-29 14:41:35 +02:00
Marek Siarkowicz
ec419f8613 tests: Add grpc authority e2e tests 2021-09-29 14:41:33 +02:00
Marek Siarkowicz
90932324b1 client: Add grpc authority header integration tests 2021-09-29 12:42:16 +02:00
Marek Siarkowicz
c3cc22c60d tests: Allow configuring integration tests to use TCP 2021-09-29 12:42:16 +02:00
Marek Siarkowicz
77cc91e0b2 test: Use unique number for grpc port 2021-09-29 12:42:16 +02:00
Marek Siarkowicz
5364758181 tests: Cleanup member interface by exposing Bridge directly 2021-09-29 12:42:16 +02:00