Brandon Philips
96cce208c2
go.mod: use go.etcd.io/etcd/v3 versioning
...
This change makes the etcd package compatible with the existing Go
ecosystem for module versioning.
Used this tool to update package imports:
https://github.com/KSubedi/gomove
2020-04-28 00:57:35 +00:00
yoyinzyc
f2c5dd4aa2
membership: add downgradeInfo to cluster; add getter and setter of downgradeInfo
2020-04-16 12:01:33 -07:00
Changxin Miao
73b936b50a
etcdserver: watch stream got closed once one request is not permitted ( #11708 )
2020-04-06 13:43:37 +08:00
jingyih
0344b70906
*: make MemberList linearizable
...
- Add linearizable field to etcdserverpb.MemberListRequest.
- Change behavior of clienv3 MemberList API. Now it is served with
linearizable guarantee.
2020-03-25 20:16:20 -07:00
Gyuho Lee
71a241e876
Merge pull request #11715 from YoyinZyc/downgrade-api
...
[Etcd downgrade] Add downgrade related api in server side
2020-03-24 21:31:51 -07:00
fengpf
1f70c0b075
*: fix goroutines typos
2020-03-24 15:33:47 +08:00
yoyinzyc
073bc22d35
etcdserver: add downgrade api in maintenance server.
2020-03-22 22:35:08 -07:00
yoyinzyc
d8b9b54348
etcdserver: add downgrade rpc proto api.
2020-03-20 17:37:26 -07:00
Gyuho Lee
92f180c574
*: log server-side /health checks
...
To make it easier to root-cause when /health check fails.
For example, we are using load balancer to health check
each etcd instance, and when one etcd node gets terminated,
it's hard to tell whether etcd "server" was really failing
or client (or load balancer") failed to reach the etcd cluster
which is also failure in load balancer health check.
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-18 11:14:05 -07:00
Gyuho Lee
33907477dd
*: add "etcd_server_client_requests_total", tests
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-17 12:16:11 -07:00
Gyuho Lee
58ba322bb4
clientv3: embed API version
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-17 12:16:11 -07:00
Grigorii Sokolik
a33e1b5fae
etcdserver/api/etcdhttp: checkHealth refactoring
...
Small refactoring of
`go.etcd.io/etcd/etcdserver/api/etcdhttp/metrics.go.checkHealth`
function just to avoid anoying repeatings of `if h.Health == "true" {`
2020-03-17 15:37:11 +02:00
Rafael Fernández López
6991f619f2
etcdserver: fix quorum calculation when promoting a learner member
...
When promoting a learner member we should not count already a voting
member, but take only into account the number of existing voting
members and their current status (started, unstarted) when taking the
decision whether a learner member can be promoted.
Before this change, it was impossible to grow from a quorum N to a N+1
through promoting a learning member.
Fixes : #11633
2020-02-20 12:06:35 +01:00
Jingyi Hu
d6a3c995cf
Merge pull request #11621 from jingyih/corruption_check_tls
...
etcdserver: make corruption check work under peer mTLS
2020-02-18 18:55:13 +08:00
Ted Yu
7e0e6bf497
mvcc/backend: remove db.tmp regardless of logger presence
2020-02-14 12:10:24 -08:00
jingyih
c031b27491
etcdserver: corruption check via http
...
During corruption check, get peer's hashKV via http call.
2020-02-14 06:03:15 -08:00
Joe Betz
213f7f7877
mvcc/backend: Delete orphaned db.tmp files before defrag
2020-02-12 22:40:28 -08:00
Jingyi Hu
61f279454e
etcdserver/api: remove capnslog ( #11606 )
...
* etcdserver/api/rafthttp: remove capnslog
* etcdserver/api/membership: remove capnslog
* etcdserver/api/v2auth: remove capnslog
* etcdserver/api/v2discovery: remove capnslog
* etdserver/api/v2stats: remove capnslog
* etcdserver/api/v2http: remove capnslog
* etcdserver/api/v3rpc: remove capnslog
* etcdserver/api: remove capnslog
Remove capnslog from etcdserver/api. Note that capnslog was
already removed in some packages under etcdserver/api in
previous commits.
2020-02-11 13:51:25 -08:00
Sahdev Zala
4c25efc1f8
Discovery: do not allow passing negative cluster size ( #11608 )
...
When an etcd instance attempts to perform service discovery, if a
cluster size with negative value is provided, the etcd instance
will panic without recovery because of
2020-02-10 10:43:41 -08:00
Daniel Lipovetsky
bc4adb8b5c
etcdserver: populate ResponseHeader in Alarm method ( #11600 )
...
When no Alarms are found, the response has no header. The header should always
be populated. Some components, like fields printer used by etcdctl, break when
the header is not populated.
Fixes #11581
Signed-off-by: Daniel Lipovetsky <dlipovetsky@d2iq.com>
2020-02-08 23:07:58 -08:00
Vern Burton
071e70cdc4
*: add a new API and command for checking auth status ( #11536 )
...
This changes have started at etcdctl under auth.go, and make changes to stub out everything down into the internal raft. Made changes to the .proto files and regenerated them so that the local version would build successfully.
2020-02-05 19:27:42 -08:00
Lars Lehtonen
f2c3bcd086
etcdserver/api/v2v3: fix dropped test error
...
etcdserver/api/v2v3: use testing.T instead of log in tests
2020-02-05 07:20:12 -08:00
yoyinzyc
7784ca8997
etcdserver: remove v2 version set; e2e: fix tests.
2019-12-09 13:08:00 -08:00
Jingyi Hu
ed5a01a48d
etcdserver: recover cluster version from backend
2019-12-05 16:25:13 -08:00
Jingyi Hu
dcd622b2c7
etcdserver: add v3 request type for cluster attr
...
Added ClusterVersionSetRequest for setting cluster version via v3 apply.
Added ClusterMemberAttrSetRequest for setting clsuter member attributes
via v3 apply.
2019-12-05 16:25:13 -08:00
yoyinzyc
80a177292e
rafthttp: add test stream support for current version.
2019-10-21 09:45:00 -07:00
Jingyi Hu
5dc12f2725
Merge pull request #11274 from YoyinZyc/fix-upgrade-failure
...
rafthttp: add 3.4.0,3.5.0 stream type
2019-10-20 19:20:06 -07:00
yoyinzyc
a0e528e4b1
rafthttp: add 3.4.0,3.5.0 stream type
2019-10-17 14:25:56 -07:00
Jingyi Hu
1333abc606
etcdserver: strip patch version in cluster version
...
Strip patch version in cluster version metrics.
2019-10-14 16:59:09 -07:00
Jingyi Hu
9c4194f6ef
etcdserver: unset old cluster version in metrics
2019-10-11 22:25:03 -07:00
Xiang Li
589ab747f7
Merge pull request #11014 from dbavatar/peervalidation
...
etcdserver: Fix PeerURL validation
2019-09-13 17:42:39 -07:00
Debabrata Banerjee
0dd10cf6b8
etcdserver: Fix PeerURL validation
...
In case of URLs that are synonyms, the current lexicographic sorting
and compare of the URLs fails with frustrating errors. Make sure to do
a full comparison between every set of PeerURLs before failing.
Fixes #11013
2019-09-13 17:53:40 -04:00
Gyuho Lee
46bddacacb
etcdserver/api: add "etcd_network_snapshot_send_inflights_total", "etcd_network_snapshot_receive_inflights_total"
...
Useful for deciding when to terminate the unhealthy follower.
If the follower is receiving a leader snapshot, operator may wait.
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-08 13:33:48 -07:00
Zeming YU
3edb569ad3
v3rpc: fix a typo err
...
don't read return value in child goroutine which causes data race.
2019-08-06 14:04:58 -07:00
Gyuho Lee
7fbbb9c8bf
*: add 3.5 capability for 3.5 dev tree
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-02 15:27:54 -07:00
Gyuho Lee
3658571e3a
etcdserver/api: enable 3.4 capability
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-02 15:24:18 -07:00
Gyuho Lee
6a0811a949
*: use new adt.IntervalTree interface
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-31 22:23:13 -07:00
Gyuho Lee
7cbe2f5dd6
etcdserver/api/v3rpc: use new "credentials" package
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-26 08:56:38 -07:00
Gyuho Lee
50babc16e7
etcdserver/api/v2v3: skip tests for CI
...
To fix in v3.5
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-26 05:54:58 -07:00
Gyuho Lee
388d15f521
Merge pull request #10622 from philips/add-v2v3-tests
...
etcdserver: api/v2v3: add initial tests
2019-07-25 10:05:29 -07:00
Sahdev P. Zala
1cef112a79
etcdserver: do not allow creating empty role
...
Like user, we should not allow creating empty role.
Related #10905
2019-07-24 17:41:24 -04:00
Tobias Schottdorf
b9c051e7a7
raftpb: clean up naming in ConfChange
2019-07-23 10:40:03 +02:00
Nima Yahyazadeh
b1812a410f
Raft HTTP: fix pause/resume race condition
2019-06-17 11:45:25 -04:00
Jingyi Hu
f8ad8ae4ad
etcdserver: use etcdserver ErrLearnerNotReady
...
If learner is not ready to be promoted, use etcdserver.ErrLearnerNotReady
instead of using membership.ErrLearnerNotReady.
2019-05-28 18:50:13 -07:00
Jingyi Hu
f5eaaaf440
etcdserver: forward member promote to leader
2019-05-28 18:50:10 -07:00
宇慕
dfe296ac3c
etcdserver: add mayPromote check
2019-05-28 18:47:03 -07:00
Jingyi Hu
aa4cda2f5c
etcdserver: allow 1 learner in cluster
...
Hard-coded the maximum number of learners to 1.
2019-05-28 18:47:03 -07:00
Jingyi Hu
c438f6db27
etcdserver: check IsMemberExist before IsLearner
...
If member does not exist in cluster, IsLearner will panic.
2019-05-28 18:47:03 -07:00
Jingyi Hu
d0c1b3fa38
etcdserver: learner return Unavailable for unsupported RPC
...
Make learner return code.Unavailable when the request is not supported
by learner. Client balancer will retry a different endpoint.
2019-05-28 18:47:03 -07:00
Jingyi Hu
76a63f9f7d
etcdserver: adjust StrictReconfigCheck
...
Adjust StrictReconfigCheck logic to accommodate learner members in the
cluster.
2019-05-28 18:47:03 -07:00