112 Commits

Author SHA1 Message Date
ahrtr
1a3822f2c3 Rename ClientConfig to ConfigSpec
The ClientConfig is a fully declarive configuration, so it makes more
sense to rename it to ConfigSpec. It can also mitigate the confusion
between Config and ClientConfig.
2022-03-13 05:41:49 +08:00
ahrtr
3dcbbf62d9 Move clientconfig into clientv3 so that it can be reused by both etcdctl and v3 discovery 2022-03-12 06:38:41 +08:00
ahrtr
2f36e0c62b Change discovery url to endpoints
Currently the discovery url is just one endpoint. But actually it
should be the same as the etcdctl, which means that it should be
a list of endpoints. When one endpoint is down, the clientv3 can
fail over to the next endpoint automatically.
2022-02-24 09:11:41 +08:00
Marek Siarkowicz
b5e224db7d
Merge pull request #13635 from ahrtr/v3_discovery
support v3 discovery to bootstrap a new etcd cluster
2022-02-21 21:50:40 +01:00
Piotr Tabor
f80f477073
Merge pull request #13644 from Juneezee/refactor/t.TempDir
*: use `T.TempDir` to create temporary test directory
2022-02-21 19:52:37 +01:00
ahrtr
ebc86d12c0 support v3 discovery to bootstrap a new etcd cluster 2022-02-21 23:22:49 +08:00
ahrtr
8681888012 fix typo, renamed ErrGPRCNotSupportedForLearner to ErrGRPCNotSupportedForLearner 2022-02-21 14:46:58 +08:00
Marek Siarkowicz
a63fa17b76
Merge pull request #13645 from yangxuanjia/yxjetcd_fix_panic_when_restart_after_removeMember
fix panic when restart after removeMember
2022-02-20 12:28:14 +01:00
bjyangxuanjia
d108a241d0 fix panic when restart after removeMember
fix panic when restart after removeMember

fix panic when restart after removeMember
2022-01-26 16:03:00 +08:00
Marek Siarkowicz
692b3c4cd7 server: Remove most of V2 API 2022-01-25 15:24:13 +01:00
Eng Zer Jun
e9edc5432c
*: use T.TempDir to create temporary test directory
The directory created by `T.TempDir()` and is automatically removed when
the test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-01-25 00:00:46 +08: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
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
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
Marek Siarkowicz
f92b4f9a28 server: Integrate version validation logic into tests 2021-10-08 12:01:54 +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
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
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
Marek Siarkowicz
66d05e5496 Try updating storage version immidietly after cluster version is set 2021-09-10 10:16:48 +02:00
Hitoshi Mitake
2a750a8dba *: implement a retry logic for auth old revision in the client 2021-09-05 01:13:52 +09: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
23b742cfd3 server: Remove Quota direct dependency on EtcdServer 2021-08-03 12:48:41 +02:00
Marek Siarkowicz
44b8ae145b etcdserver: Move datadir and wal to storage package 2021-08-03 12:47:37 +02:00
Sahdev Zala
2526463e44
Merge pull request #13236 from roytman/expensiveRequest
etcdserver: configure "expensive" requests duration
2021-08-02 09:33:43 -04: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
Sergey Kacheev
daf7e0350a etcdserver: remove code duplication from the peer.send func
During the refactoring process, duplicate logging
of the send buffer overflow event was added.
Each of these log lines logs exactly the same information, the logging
context is sufficient to distinguish the cause.
Additionally, the unnecessary context (in parentheses) in the log
message was removed, which was necessary without the zap context (with
the old logger), but now only confuses.
2021-07-22 23:15:20 +07:00
Marek Siarkowicz
2f31cc3fbc etcdserver: Create AlarmBackend interface 2021-07-20 17:53:44 +02:00
Marek Siarkowicz
5b6f4579fb server: Rename buckets to schema 2021-07-12 15:37:21 +02:00
Marek Siarkowicz
5e40a8b00c server: Create storage package and move mvcc files to it 2021-07-12 15:37:21 +02:00
ahrtr
d38c383c0d etcdserver: skip empty alarm from the query parameter 2021-07-05 23:54:49 +08:00
Marek Siarkowicz
bf3e7033e9 etcdserver: Move Read/Update methods on Meta bucket to one place
There are still some left like compact keys, but they will require more
work to avoid circular dependency.
2021-07-05 13:23:53 +02:00
Piotr Tabor
1208505290
Merge pull request #13161 from serathius/membership
etcdserver: Membership uses MembershipStorage interface instead of directly accessing Backend
2021-07-03 11:33:38 +02:00
Marek Siarkowicz
e5a026822b etcdserver: Move put/read/delete on Alarm bucket to bucket package 2021-07-01 13:35:10 +02:00