219 Commits

Author SHA1 Message Date
Marek Siarkowicz
692b3c4cd7 server: Remove most of V2 API 2022-01-25 15:24:13 +01:00
Piotr Tabor
a1fb9ff1e4
Merge pull request #13621 from serathius/integration-v2-api
Remove V2 API usage from Integration tests
2022-01-24 12:28:42 +01:00
Marek Siarkowicz
87c8e8b868 test: Migrate to ClusterV3 cluster in integration tests 2022-01-20 14:10:09 +01:00
ahrtr
15568f4c00 add protection code for Range when the sortTarget is an invalid value 2022-01-18 07:46:37 +08:00
ahrtr
f8aafea504 add protection code to prevent etcd from panic when the client api version is not valid UTF-8 2022-01-17 06:21:22 +08:00
Sahdev Zala
f4266e2d75
Merge pull request #13575 from AdamKorcz/fuzz1
v2auth: fix out of bounds in test
2022-01-15 23:30:10 -05:00
Marek Siarkowicz
ee5ef42c5c server: --enable-v2 and --enable-v2v3 is decomissioned 2022-01-14 13:19:30 +01:00
AdamKorcz
6aac35dd32 v2auth: fix out of bounds in test 2022-01-10 19:06:07 +00:00
ahrtr
7be1464ef1 set the backend again after recovering v3 backend from snapshot 2021-12-03 05:52:12 +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
Sahdev Zala
d357f9b361
Merge pull request #13399 from ahrtr/serializable_health_check
Enhance health check endpoint to support serializable request
2021-11-15 11:46:55 -05: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
ahrtr
09ff05108b enhance health check endpoint to support serializable request 2021-11-15 05:57:54 +08:00
Chao Chen
f6f27d32d1 server/etcdserver/api/etcdhttp: exclude the same alarm type activated by multiple peers 2021-11-09 11:33:59 -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
fd0b98b6c0
Merge pull request #13404 from JmPotato/refine_periodic
v3compactor: refine some code and fix a typo
2021-10-29 23:25:23 +02:00
Piotr Tabor
6c2f5dc78a
Merge pull request #13405 from serathius/downgrade-b
Implement single node downgrades
2021-10-29 23:22:10 +02:00
Marek Siarkowicz
9d47a97b0b server: Remove lock from adapter to avoid deadlock 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
335dc98c8d server: Use server version to decide if to downgrade has finished 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
Marek Siarkowicz
758fc0f8ad server: Depend only on cluster version to detect downgrade
Problem with old code was that during downgrade only members with
downgrade target version were allowed to join. This is unrealistic as
it doesn't handle any members to disconnect/rejoin.
2021-10-29 12:47:17 +02: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
Jille Timmermans
923f0aa3e7 etcdserver: Expose metrics with all known peers
To make it possible to alert on misconfigured etcd clusters that have
missing/superfluous peers, expose the list of peers as a metric.
This metric can, for example, be compared to the control-plane nodes of
a kubernetes cluster.
2021-10-09 14:27:10 +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
f92b4f9a28 server: Integrate version validation logic into tests 2021-10-08 12:01:54 +02:00
Marek Siarkowicz
620832a4a5 server: Use panic instead of os.Exit in mustDetectDowngrade 2021-10-08 12:01:54 +02:00
Marek Siarkowicz
d039f016c5 server: Move Storage interface to storage package 2021-10-08 12:01:53 +02:00
Marek Siarkowicz
e47c3c22d2 server: Move downgrade API logic into version package 2021-10-08 12:01:51 +02:00
Marek Siarkowicz
1e5e57f268 server: Move downgrade detection code to version package 2021-10-08 10:41:37 +02:00
Marek Siarkowicz
378159af30 server: Refactor cluster version decision code 2021-10-08 10:41:37 +02:00
Marek Siarkowicz
2de36c0596 server: Cover monitor with upgrade unit tests 2021-10-08 10:41:35 +02:00
JmPotato
471a804665 Remove the unnecessary code
Signed-off-by: JmPotato <ghzpotato@gmail.com>
2021-10-08 14:59:41 +08:00
JmPotato
0504ecdc70 Refine some code and fix a typo
Signed-off-by: JmPotato <ghzpotato@gmail.com>
2021-10-08 12:07:02 +08: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
90932324b1 client: Add grpc authority header integration tests 2021-09-29 12:42:16 +02:00
Piotr Tabor
752a206da4
Merge pull request #13238 from sakateka/etcdserver-logs
etcdserver: remove code duplication from the peer.send func
2021-09-27 09:01:34 +02:00
Piotr Tabor
ca5bad0e83
Merge pull request #13261 from njhill/sorting
etcdserver,clientv3: server-side ignore sort-ascend-key for range reqs
2021-09-25 17:47:10 +02:00
Marek Siarkowicz
35db0a5817 server: Refactor databaseFileMissing function 2021-09-20 12:21:36 +02:00
Marek Siarkowicz
39f92a32ca server: Move member dir creation up and introduce Close method to bootstrap structs 2021-09-20 12:21:36 +02:00
Marek Siarkowicz
a206ad2c96 server: Rename GetIDs to GetEffectiveNodeIDsFromWalEntries 2021-09-20 12:21:36 +02:00
Marek Siarkowicz
a450dc7f91 server: Rename function to NewConfigChangeEntries indicating we are not reading it from wal 2021-09-20 12:21:36 +02:00
Marek Siarkowicz
4884e7d8cf server: Move wal bootstrap from cluster to storage 2021-09-20 12:21:35 +02:00
Marek Siarkowicz
d3abf774ea server: Move cluster backend setting up the call hierarchy 2021-09-20 12:20:21 +02:00
Marek Siarkowicz
049e2d6ec0 server: Move raft up the bootstrap hierarchy 2021-09-20 12:20:19 +02:00
Marek Siarkowicz
138afa5be9 server: Split wal, cluster and raft bootstraping 2021-09-20 12:19:10 +02:00
Marek Siarkowicz
5d044563a8 server: Move raft and wal up the bootstrap hierarchy 2021-09-20 12:19:10 +02:00
Marek Siarkowicz
8b0d8ea2af server: Move cluster up the bootstrap hierarchy 2021-09-20 12:19:09 +02:00
Marek Siarkowicz
7c8f7166e7 server: Move bootstraping backend from snapshot to bootstrapBackend 2021-09-20 12:17:33 +02:00
Marek Siarkowicz
0211f5a2e8 server: Move snapshot recovery to separate function 2021-09-20 12:07:42 +02:00