Piotr Tabor
e62417297d
*: Rename of imports of raft (as its now a module)
...
% find -name '*.go' -o -name '*.md' -o -name '*.sh' | xargs sed -i --follow-symlinks 's|etcd/v3/raft|etcd/raft/v3|g'
2020-10-16 13:58:18 +02:00
Piotr Tabor
de55bb6331
pkg: Rename imports after making 'pkg' a module
...
find -name '*.go' | xargs sed --follow-symlinks -i 's|go.etcd.io/etcd/v3/pkg/|go.etcd.io/etcd/pkg/v3/|g'
go fmt ./...
2020-10-13 00:09:27 +02:00
Piotr Tabor
f67956cb7a
clientv3: Expose clientv3/examples close to the code.
...
Many of the tests had missing '// Output:' comment, so were not
runnable. They required fining.
2020-10-08 14:27:32 +02:00
Piotr Tabor
28f2b07623
*: Update references to code moved to the api/ dir.
...
Follow up to file-moves done in the previous commit.
The commit contains purely mechanical consequences of execution (apart
of scripts/genproto.sh):
% find ./ -name '*.go' | xargs sed --follow-symlinks -i 's|v3/etcdserver/api/v3rpc/rpctypes|v3/api/v3rpc/rpctypes|g'
% find ./ -name '*.go' | xargs sed --follow-symlinks -i 's|v3/version|v3/api/version|g'
% find ./ -name '*.go' | xargs sed --follow-symlinks -i 's|v3/mvcc/mvccpb|v3/api/mvccpb|g'
% find ./ -name '*.go' | xargs sed --follow-symlinks -i 's|v3/etcdserver/etcdserverpb|v3/api/etcdserverpb|g'
% find ./ -name '*.go' | xargs sed --follow-symlinks -i 's|v3/etcdserver/api/membership/membershippb|v3/api/membershippb|g'
% find ./ -name '*.go' | xargs sed --follow-symlinks -i 's|v3/auth/authpb|v3/api/authpb|g'
% find ./ -name '*.proto' -o -name '*.md' | xargs -L 1 sed --follow-symlinks -i 's|/mvcc/mvccpb/kv.proto|/api/mvccpb/kv.proto|g'
% find ./ -name '*.proto' -o -name '*.md' | xargs -L 1 sed --follow-symlinks -i 's|/auth/authpb/auth.proto|/api/authpb/auth.proto|g'
% find ./ -name '*.proto' -o -name '*.md' | xargs -L 1 sed --follow-symlinks -i 's|/etcdserver/api/membership/membershippb/membership.proto|/api/membershippb/membership.proto|g'
I also modified manually paths in scripts/genproto.sh.
% go fmt ./...
2020-10-06 11:56:16 +02:00
Pierre Zemb
cc2b4cd05e
etcdserver: add more detailed traces on linearized reading ( #12335 )
...
To improve debuggability of `agreement among raft nodes before
linearized reading`, we added some tracing inside
`linearizableReadLoop`.
This will allow us to know the timing of `s.r.ReadIndex` vs
`s.applyWait.Wait(rs.Index)`.
2020-09-26 19:08:36 -07:00
CFC4N
8050881aaf
clientv3:get AuthToken gracefully without extra connection. ( #12165 )
...
* etcdserver: check authinfo if it is not InternalAuthenticateRequest.
* credentials: let GetRequestMetadata() return nil when authToken isn't initialized.
* clientv3: get AuthToken gracefully without extra connection.
2020-09-25 11:01:54 -07:00
Sahdev Zala
ef866a6d8b
Merge pull request #11943 from mitake/bcrypt-in-api
...
auth, etcdserver: hash password in the API layer
2020-07-20 10:52:24 -04:00
Hitoshi Mitake
5a3da48cdf
auth, etcdserver: hash password in the API layer
2020-07-14 00:15:19 +09:00
yoyinzyc
2541b0bba9
etcdserver: apply downgrade policy to server.
2020-06-24 11:06:29 -07:00
yoyinzyc
d230e6ba8c
etcdserver: handle and apply downgrade validate, enable and cancel requests
2020-05-15 14:45:00 -07:00
Hitoshi Mitake
feb56298dd
etcdserver: don't let InternalAuthenticateRequest have password ( #11818 )
2020-05-06 16:46:41 -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
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
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
yoyinzyc
073bc22d35
etcdserver: add downgrade api in maintenance server.
2020-03-22 22:35:08 -07:00
Jingyi Hu
c94782cd55
etcdserver: remove capnslog ( #11611 )
...
remove capnslog from etcdserver pkg, except etcdserver/api.
2020-02-11 08:54:14 -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
Hitoshi Mitake
84e2788c2e
Merge pull request #10468 from jingyih/remove_auth_loop
...
etcdserver: remove infinite loop for auth in raftRequest
2019-10-29 00:11:40 +09:00
yoyinzyc
57aa68af5a
etcdserver: trace compaction request; add return parameter 'trace' to applierV3.Compaction()
...
mvcc: trace compaction request; add input parameter 'trace' to KV.Compact()
2019-10-07 09:55:27 -07:00
yoyinzyc
3a3eb24c69
etcdserver: trace raft requests.
2019-10-01 15:38:52 -07:00
yoyinzyc
1d6ef8370e
pkg: use zap logger to format the structure log output.
2019-09-30 13:11:21 -07:00
yoyinzyc
3830b3ef11
pkg: add field to record additional detail of trace; add stepThreshold
...
to reduce log volume.
2019-09-30 13:11:21 -07:00
yoyinzyc
f4e7fc56a7
pkg: create package traceutil for tracing. mvcc: add tracing
...
steps:range from the in-memory index tree; range from boltdb.
etcdserver: add tracing steps: agreement among raft nodes before
linerized reading; authentication; filter and sort kv pairs; assemble
the response.
2019-09-30 13:06:02 -07:00
Jingyi Hu
f5eaaaf440
etcdserver: forward member promote to leader
2019-05-28 18:50:10 -07:00
Gyuho Lee
34bd797e67
*: revert module import paths
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-05-28 15:39:35 -07:00
shivaramr
9150bf52d6
go modules: Fix module path version to include version number
2019-04-26 15:29:50 -07:00
Jingyi Hu
7aa6358510
etcdserver: remove auth validation loop
...
Remove auth validation loop in v3_server.raftRequest(). Re-validation
when error ErrAuthOldRevision occurs should be handled on client side.
2019-02-12 15:40:39 -08:00
Maxim Vladimirskiy
91e583cba6
etcdserver: Remove infinite loop in doSerialize
...
Once chk(ai) fails with auth.ErrAuthOldRevision it will always do,
regardless how many times you retry. So the error is better be returned
to fail the pending request and make the client re-authenticate.
2018-11-12 23:28:24 +03:00
nolouch
c15fb607f6
server: broadcast leader changed
2018-09-17 14:15:04 +08:00
nolouch
4de27039cb
server: drop read request if found leader changed
2018-09-14 15:58:35 +08:00
Gyuho Lee
1399bc69ce
etcdserver: update import paths to "go.etcd.io/etcd"
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-28 17:47:55 -07:00
Gyuho Lee
38711761a1
etcdserver: clarify read index wait timeout warnings
...
"read index" doesn't tell much about the root cause.
Most likely, the local follower node is having slow
network, thus timing out waiting to receive read
index response from leader.
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-17 17:59:41 -07:00
Gyuho Lee
37000cc4b8
etcdserver: add "etcd_server_slow_read_indexes_total"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-07-02 12:58:35 -07:00
Gyuho Lee
4733a1db5c
etcdserver: clarify read index warnings
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-07-02 12:53:35 -07:00
Joe Betz
b47e148d5d
etcdserver: Add response byte size and range response count to took too long warning
2018-06-11 10:02:30 -07:00
Gyuho Lee
9149565cb3
*: move to "etcdserver/api/membership"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-21 10:31:16 -07:00
Hitoshi Mitake
a9225c164a
etcdserver: not print password in the warning message of expensive request
...
Fix https://github.com/coreos/etcd/issues/9635
2018-04-30 13:44:27 -07:00
Gyuho Lee
bdbed26f64
etcdserver: support structured logging
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-16 17:36:00 -07:00
nolouch
3c52342b37
etcdserver: handle proposal error when processing internal raft request
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-09 14:44:57 -07:00
Gyuho Lee
8a518b01c4
*: revert "internal/mvcc" change
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-26 17:11:40 -08:00
Gyuho Lee
dd2f3b0de8
*: revert "internal/lease" change
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-26 17:11:40 -08:00
Gyuho Lee
bb95d190c1
*: revert "internal/auth" change
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-26 17:11:40 -08:00
Xiang
b83244bd35
etcdserver: improve request took too long warning
2018-02-06 12:15:52 -08:00
Hitoshi Mitake
6c91766490
*: move "auth" to "internal/auth"
2018-01-29 14:57:35 +09:00
Gyuho Lee
80d15948bc
*: move "mvcc" to "internal/mvcc"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-26 11:14:41 -08:00
Gyuho Lee
349a377a67
*: move "lease" to "internal/lease"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-26 11:09:29 -08:00
Hitoshi Mitake
1296281b27
etcdserver: swap priority of cert CN and username + password
2017-09-22 15:53:47 +09:00
Gyu-Ho Lee
f65aee0759
*: replace 'golang.org/x/net/context' with 'context'
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-07 13:39:42 -07:00
Gyu-Ho Lee
d25ae50c02
etcdserver: implement LeaseLeases API
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-08-14 14:18:56 -07:00
Anthony Romano
478ba2c4f2
etcdserver: consolidate error checking for v3_server functions
...
Duplicated error checking code moved into raftRequest/raftRequestOnce.
2017-07-25 14:28:39 -07:00