Siyuan Zhang
3897103b77
etcdserver: add metric counters for livez/readyz health checks.
...
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2023-11-14 09:26:00 -08:00
Tessa Pham
2b7e1c6f82
fix scripts
...
Signed-off-by: Tessa Pham <hpham111@bloomberg.net>
2023-11-08 00:27:13 -06:00
Chao Chen
8a6c1335e2
v3rpc: run health notifier to listen on online defrag state change
...
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-28 17:49:24 -07:00
Chao Chen
ea035471ce
online defrag notifies gRPC health server to expose NOT_SERVING status
...
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-25 08:58:33 -07:00
Benjamin Wang
34382006db
test: implement method ForgetLeader for struct nodeRecorder
...
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-10-24 10:19:13 +01:00
Chao Chen
1324f03254
add existing http health check handler e2e test
...
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-18 12:42:23 -07:00
Wei Fu
aea1cd0077
feat: enable unparam lint
...
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-10-17 21:24:13 +08:00
Siyuan Zhang
7a57e06eca
etcdserver: add livez and ready http endpoints for etcd.
...
Add two separate probes, one for liveness and one for readiness. The liveness probe would check that the local individual node is up and running, or else restart the node, while the readiness probe would check that the cluster is ready to serve traffic. This would make etcd health-check fully Kubernetes API complient.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2023-10-14 22:32:16 -07:00
Eng Zer Jun
867faa1924
etcdserver: remove redundant len
check in health check
...
From the Go specification [1]:
"1. For a nil slice, the number of iterations is 0."
`len` returns 0 if the slice or map is nil [2]. Therefore, checking
`len(v) > 0` around a loop is unnecessary.
[1]: https://go.dev/ref/spec#For_range
[2]: https://pkg.go.dev/builtin#len
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-10-13 18:39:38 +08:00
Chao Chen
c25f1dff82
http health check bug fixes
...
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-12 16:59:34 -07:00
Geeta Gharpure
70a3205506
fix broken unit test in server_test.go
...
Signed-off-by: Geeta Gharpure <geetagh@amazon.com>
2023-09-28 20:07:06 +01:00
Benjamin Wang
9c9804399e
do not update RaftCluster.members and RaftCluster.removed if the v3store is ahead of the current replayed WAL entry index
...
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-28 20:06:12 +01:00
Benjamin Wang
628b45c099
test: add a test case to verify consistent memberlist on bootstrap
...
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-28 20:04:47 +01:00
Wei Fu
4704a5af3a
*: fix unused issue
...
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-25 19:37:18 +08:00
Wei Fu
896d161d16
*: fix stylecheck linter
...
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-25 19:14:01 +08:00
Wei Fu
07effc4d0a
*: fix revive linter
...
Remove old revive_pass in the bash scripts and migirate the revive.toml
into golangci linter_settings.
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-24 14:21:11 +08:00
Wei Fu
aa97484166
*: enable goimports in verify-lint
...
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-21 21:14:09 +08:00
Wei Fu
9c3edfa0af
*: fix staticcheck lint
...
Changed TraceKey/StartTimeKey/TokenFieldNameGRPCKey to struct{} to
follow the correct usage of context. Similar patch to #8901 .
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-21 11:24:26 +08:00
Wei Fu
5e3910d96c
*: fix govet-shadow lint
...
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-19 20:24:01 +08:00
Benjamin Wang
189f709a5d
Apply patches on the generated *.pb.gw.go files to convert v1 messages to v2 messages
...
Signed-off-by: Benjamin Wang <wachao@vmware.com>
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-18 11:22:16 +01:00
Benjamin Wang
4ec581a6a3
re-generate all the *.pb.gw.go files
...
Run ./scripts/genproto.sh
Signed-off-by: Benjamin Wang <wachao@vmware.com>
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-18 11:22:15 +01:00
Wei Fu
522b698928
upgrade grpc-gateway from v1 to v2
...
Signed-off-by: Wei Fu <fuweid89@gmail.com>
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-18 11:22:15 +01:00
Benjamin Wang
700411d838
Merge pull request #16601 from fuweid/fix-nakedret-lint
...
*: fix nakedret lint
2023-09-18 10:00:25 +01:00
Wei Fu
e72c2c40d4
*: fix nakedret lint
...
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-17 23:52:41 +08:00
chenyahui
c0aa3b613b
Use any instead of interface{}
...
Signed-off-by: chenyahui <cyhone@qq.com>
2023-09-17 17:41:58 +08:00
Marek Siarkowicz
76cbfd3644
Use test cases from TestCheckTxn to test Put and Range
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-09-01 20:33:41 +02:00
Marek Siarkowicz
27633923e4
Merge pull request #16515 from serathius/test-txn
...
server: Test txn checking
2023-09-01 15:24:42 +02:00
Marek Siarkowicz
e1617f98ba
server: Test txn checking
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-09-01 14:51:22 +02:00
Marek Siarkowicz
bd7f0dab3c
server: Refactor checkTxn into single function handling all request types
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-08-29 11:36:03 +02:00
Geeta Gharpure
8729417cee
Preserve the order of steps done for snapshot
...
Signed-off-by: Geeta Gharpure <geetagh@amazon.com>
2023-08-22 19:12:37 +00:00
Geeta Gharpure
59332dc194
Update to generate v2 snapshot from v3 state
...
Signed-off-by: Geeta Gharpure <geetagh@amazon.com>
2023-08-21 19:18:11 +00:00
Benjamin Wang
e2e17c75fe
Merge pull request #16448 from testwill/pkg-import
...
chore: pkg import more than once
2023-08-21 18:11:06 +08:00
Marek Siarkowicz
9a6eab2d72
Merge pull request #16373 from serathius/unify-arguments
...
server: Unify arguments for mvcc methods
2023-08-21 10:09:10 +02:00
guoguangwu
f432c1cf20
chore: pkg import more than once
...
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-08-21 10:19:05 +08:00
Jes Cok
52748f60f3
all: stop using math/rand.Seed
...
Fixes #16428 .
Signed-off-by: Jes Cok <xigua67damn@gmail.com>
2023-08-20 16:34:44 +08:00
Marek Siarkowicz
d9408473c5
server: Unify arguments for mvcc methods
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-08-18 13:41:13 +02:00
Marek Siarkowicz
81ecac11cb
server: Separate txnRead from txnWrite
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-08-04 20:46:33 +02:00
Marek Siarkowicz
524fddc426
Merge pull request #16355 from serathius/txn-refactor
...
server: Separate internal txn functions for recursion and have public function create transaction and trace
2023-08-04 15:54:14 +02:00
Benjamin Wang
10c7e81cac
Merge pull request #16358 from ahrtr/remove_creds_bundle_20230802
...
clientv3: remove the experimental gRPC API grpccredentials.Bundle
2023-08-04 08:46:02 +01:00
Benjamin Wang
0021204c15
Merge pull request #16132 from geetasg/pr5
...
Add a method to export membership info to v2 store from RaftCluster
2023-08-04 08:43:27 +01:00
Marek Siarkowicz
fa21c07baa
server: Separate internal functions for recursion and have public function create transaction and trace
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-08-03 17:47:03 +02:00
Benjamin Wang
979102f895
clientv3: remove the experimental gRPC API grpccredentials.Bundle
...
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-08-02 19:35:51 +01:00
Marek Siarkowicz
53cbd81009
Separate Writer interface from BatchTx interfaces
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-07-31 10:18:01 +02:00
Geeta Gharpure
e5b7dde17e
Add a method to export membership info to v2 store from RaftCluster
...
Signed-off-by: Geeta Gharpure <geetagh@amazon.com>
2023-07-28 16:55:41 +00:00
lan.tian
0f975acf2f
update typo in raft.go
...
Signed-off-by: lan.tian <lance5890@163.com>
2023-07-24 15:48:55 +08:00
iuriatan
abbfc2964a
Fix goword issue
...
Fix `make verify` issues after updating golangci-lint
Signed-off-by: iuriatan <iuriatan@gmail.com>
2023-07-14 16:46:26 -03:00
Benjamin Wang
f4444e8fb3
Merge pull request #16154 from CaojiamingAlan/uber_applier_test
...
add tests for uber applier
2023-07-06 20:00:11 +01:00
Benjamin Wang
e887e5291a
Merge pull request #16067 from geetasg/pr1
...
Adding test for updateClusterVersionV3
2023-07-06 08:36:19 +01:00
caojiamingalan
eff9517a90
etcdserver: add cluster id check for hashKVHandler
...
Signed-off-by: caojiamingalan <alan.c.19971111@gmail.com>
2023-07-05 14:09:40 -05:00
caojiamingalan
ffe73f9a15
add tests for uber applier
...
Signed-off-by: caojiamingalan <alan.c.19971111@gmail.com>
2023-06-30 22:03:29 -05:00