32 Commits

Author SHA1 Message Date
Piotr Tabor
9abc895122 Goimports: Apply automated fixing to test files as well.
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-29 13:04:45 +01:00
Piotr Tabor
9e1abbab6e Fix goimports in all existing files. Execution of ./scripts/fix.sh
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-29 09:41:31 +01:00
Benjamin Wang
faff80a2b3 etcdserve: format the source code
gofmt -w ./server

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-02 13:00:59 +08:00
Benjamin Wang
e9aa275b36 etcdserver: update etcdserver to use the new raft module go.etcd.io/raft/v3
Just replaced all go.etcd.io/etcd/raft/v3 with go.etcd.io/raft/v3
under directory server.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-02 09:33:45 +08:00
Andrew Sims
f656fa0f49 add missing copyright headers
Signed-off-by: Andrew Sims <andrew.cameron.sims@gmail.com>
2022-11-23 19:13:43 +11:00
Sasha Melentyev
2c9c209eb6 all: Changing Printf and friends to Print if there is no formatting
Signed-off-by: Sasha Melentyev <sasha@melentyev.io>
2022-11-15 22:11:23 +03:00
demoManito
a9c3d56508 etcd: remove redundant type conversion
Signed-off-by: demoManito <1430482733@qq.com>
2022-09-20 11:26:02 +08:00
Piotr Tabor
5097b33ab9 Rename etcdserver/etcderrors package to etcdserver/errors. 2022-05-20 14:32:04 +02:00
Piotr Tabor
fc6a6c3c27 Move etcdserver/errors.go to sepatate package to avoid cyclic dependencies. 2022-05-20 14:32:04 +02:00
ahrtr
e7f8bf7c44 enhance the /version endpoint to add storageVersion 2022-05-06 20:29:42 +08:00
Marek Siarkowicz
26f42e7a9e server: Apply review comments and split basic handler 2022-05-05 09:52:14 +02:00
Marek Siarkowicz
fb361e43f0 server: Split code for debug and version endpoints 2022-05-05 09:52:14 +02:00
Marek Siarkowicz
722ec487df server: Split metrics and health code 2022-05-05 09:52:14 +02:00
Marek Siarkowicz
600ee13ac0 server: Cover V3 health with tests 2022-05-05 09:52:14 +02:00
Marek Siarkowicz
e9dec74ded server: Refactor health checks 2022-05-05 09:52:14 +02:00
Marek Siarkowicz
191aed645e server: Run health check tests in subtests 2022-05-05 09:52:14 +02:00
Marek Siarkowicz
e4e391792a server: Rename test case expect fields 2022-05-05 09:52:13 +02:00
Marek Siarkowicz
0fb194d6f2 server: Use named struct initialization in healthcheck test 2022-05-05 09:52:13 +02:00
Marek Siarkowicz
0096d2ecdb server: Remove unused NewClientHandler 2022-05-05 09:52:13 +02:00
Marek Siarkowicz
804fddf921 tests: Use zaptest.NewLogger in tests 2022-04-04 13:03:15 +02:00
Marek Siarkowicz
692b3c4cd7 server: Remove most of V2 API 2022-01-25 15:24:13 +01: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
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
ahrtr
d38c383c0d etcdserver: skip empty alarm from the query parameter 2021-07-05 23:54:49 +08:00
tangcong
dd62aebfb5 fix health endpoint not usable when authentication is enabled 2021-06-25 14:02:45 +08:00
Chao Chen
140ea4fa29 etcdhttp/metrics.go: exclude alarms from health check conditionally with ?exclude=NOSPACE 2021-04-20 13:17:09 -07:00
Piotr Tabor
3bb7acc8cf Migrate dependencies pkg/foo -> client/pkg/foo 2021-04-07 00:38:47 +02:00
Chao Chen
2ae3e82f07 etcdserver/api/etcdhttp: log successful etcd server side health check in debug level
When we have an external component that checks /health periodically, the
etcd server logs can be quite verbose (e.g., DDOS-ing against insure
etcd health check can lead to disk space full due to large log files).

This change was introduced in #11704.

While we keep the warning logs for etcd health check failures, the
success (or OK) log level should be set to DEBUG.

Fixes #12676
2021-02-08 17:15:43 -08:00
Yanhao Mo
6d82778a4e etcdserver: export method EtcdServer.leaderChangedNotify (#12378) 2021-02-02 18:13:32 +08:00
Piotr Tabor
aaf423e962 server: Update imports.
find -name '*.go' | xargs sed -i --follow-symlinks 's|etcd/v3/|etcd/server/v3/|g'
2020-10-26 13:02:32 +01:00
Piotr Tabor
4a5e9d1261 server: Move server files to 'server' directory.
26  git mv mvcc wal auth etcdserver etcdmain proxy embed/ lease/ server
   36  git mv go.mod go.sum server
2020-10-26 12:57:19 +01:00