1949 Commits

Author SHA1 Message Date
Gyuho Lee
4ddcc36057 etcdserver/api/v3rpc: document, clean up snapshot sends
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-14 22:57:52 -07:00
Gyuho Lee
f1179fd70d etcdserver/api/snap: update format string in "ReleaseSnapDBs"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-14 22:57:20 -07:00
Joe Betz
743e6e92cb etcdserver/*, wal/*: Remove orphaned .snap.db files during Release 2020-05-14 15:16:51 -07:00
Joe Betz
b68eea236e etcdserver/*, wal/*:Add comments, clean up error messages and tests 2020-05-14 13:34:55 -07:00
Joe Betz
bd16071846
etcdserver/*, wal/*: find valid snapshots by cross checking snap files and wal snap entries 2020-05-14 09:22:45 -07:00
Viacheslav Biriukov
50517039ae
etcdserver/*, wal/*: add Sync method 2020-05-13 08:47:47 -07:00
Viacheslav Biriukov
91efa67cb1
etcdserver/*: rollback default settings 2020-05-13 08:47:47 -07:00
Viacheslav Biriukov
5435e7686a
etcdserver/*: fix tests 2020-05-13 08:47:41 -07:00
Viacheslav Biriukov
3d2b565f98
etcdserver/*: changes to snapshots and wal logic to fix #10219 2020-05-13 08:46:15 -07:00
Viacheslav Biriukov
9162cd613d
etcdserver/*, wal/*: changes to snapshots and wal logic to fix #10219 2020-05-13 08:42:03 -07:00
Gyuho Lee
ab494956bf
Merge pull request #11862 from gyuho/const
etcdserver: compute max request bytes humanized string once
2020-05-11 19:36:37 -07:00
Gyuho Lee
d93c36bbb9 *: run "gofmt -s" on genproto complete
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-09 23:14:32 -07:00
Gyuho Lee
89a3a24d5a etcdserver: compute max request bytes humanized string once
No need to compute the request size limit everytime in runtime

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-09 23:11:45 -07:00
Hitoshi Mitake
feb56298dd
etcdserver: don't let InternalAuthenticateRequest have password (#11818) 2020-05-06 16:46:41 -07:00
Xiang Li
d9d850c885
rafthttp: add snapshot limit const (#11846) 2020-05-04 23:26:22 -07:00
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
Gyuho Lee
0908a8bd10
Merge pull request #11725 from YoyinZyc/downgrade-api
[Etcd Downgrade] Store downgrade info to backend
2020-04-17 15:29:10 -07:00
tangcong
6c41190bc5 etcdserver: make recoverSnapshotBackend more robust 2020-04-17 09:30:22 +08:00
tangcong
3c85b67f7b etcdserver: remove redundant storage restore operation 2020-04-17 06:43:24 +08: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
Yuchen Zhou
c623f798cb
etcdserver: add trace for txn request (#11491)
* etcdserver: add trace for txn request

* pkg/traceutil: added StopSubTrace as a sign of the end of subtrace. Added test case for logging out subtrace.
2020-04-04 14:46:03 -07:00
Sahdev Zala
a04b74d4b4
Merge pull request #11639 from jingyih/linearizable_memberlist
*: serve member list API with linearizable guarantee
2020-03-27 11:13:58 -04: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
3ac7a11515
Merge pull request #11699 from tangcong/refactor-consistentindex
*: refactor consistentindex
2020-03-25 18:07:44 -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
tangcong
631c23d198 etcdserver/cindex: add unit test 2020-03-25 10:59:19 +08:00
tangcong
7b2018683a *: refactor consistent index 2020-03-25 10:59:15 +08: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
Jingyi Hu
193e60ebd9
Merge pull request #11670 from tangcong/optimize-auth-store-log
*: optimize auth/etcdserver logs to facilitate troubleshooting data inconsistency
2020-03-16 00:15:14 +08:00
tangcong
5a17367923 etcdserver: print warn log when failed to apply request 2020-03-10 23:13:53 +08:00
shawwang
15eeb2c4ae etcdserver: add auth revision to AuthStatus to improve observability and testability 2020-03-04 22:37:24 +08:00
tangcong
06ad53321e *: fix auth revision corruption bug 2020-02-29 13:31:37 +08: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
Jingyi Hu
c94782cd55
etcdserver: remove capnslog (#11611)
remove capnslog from etcdserver pkg, except etcdserver/api.
2020-02-11 08:54:14 -08:00
Hitoshi Mitake
fda8d38bd4 etcdserver: mark AuthStatus as no side effect request 2020-02-11 23:26:50 +09: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