Commit Graph

1425 Commits

Author SHA1 Message Date
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
34382006db test: implement method ForgetLeader for struct nodeRecorder
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-10-24 10:19:13 +01:00
ae60b5567a bump raft to latest commit
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-10-24 10:17:57 +01:00
d2af596a98 depdendency: bump github.com/prometheus/common from 0.44.0 to 0.45.0.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-10-24 17:44:01 +13:00
e6e740fb80 depdendency: bump google.golang.org/grpc from 1.58.3 to 1.59.0.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-10-24 17:39:39 +13:00
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
11edde9204 Merge pull request #16622 from fuweid/fix-unparam-lint
*: enable and fix unparam lint
2023-10-18 09:21:22 +02:00
f96000e15d *: cleanup main_test.go
The #15544 has removed the `build_cov` build. And after go1.20, we use
`-cover` buildflag to enable coverage exporter. We don't need to
maintain main_test.go anymore.

```bash
➜  pwd
/home/fuwei/go/src/go.etcd.io/etcd/etcdctl

➜  go build -o /tmp/etcdctl -cover ./

➜  mkdir /tmp/etcdctl-covdata

➜  GOCOVERDIR=/tmp/etcdctl-covdata /tmp/etcdctl get /health

➜  go tool covdata percent -i=/tmp/etcdctl-covdata
        go.etcd.io/etcd/etcdctl/v3      coverage: 66.7% of statements
        go.etcd.io/etcd/etcdctl/v3/ctlv3        coverage: 83.3% of statements
        go.etcd.io/etcd/etcdctl/v3/ctlv3/command        coverage: 15.4% of statements
```

REF: https://go.dev/testing/coverage/

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-10-17 21:47:23 +08:00
aea1cd0077 feat: enable unparam lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-10-17 21:24:13 +08:00
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
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
c25f1dff82 http health check bug fixes
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-12 16:59:34 -07:00
e4c0eb7712 bump google.golang.org/grpc to v1.58.3
Signed-off-by: Allen Ray <alray@redhat.com>
2023-10-11 10:39:05 -04:00
3a61187ce3 bump golang.org/x/net to v0.17.0
Address CVE-2023-39325 and CVE-2023-44487

Signed-off-by: Allen Ray <alray@redhat.com>
2023-10-11 10:09:14 -04:00
9f40116fa0 Return to default write scheduler since golang.org/x/net@v0.11.0 started using round robin
Introduction of round robin 120fc906b3
Added in v0.10.0 https://github.com/golang/net/compare/v0.10.0...v0.11.0

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-10 16:31:42 +02:00
4540db9a7c Merge pull request #16731 from sharathsivakumar/shsi/bump_dependencies_6
Bump dependencies generated by the bot manually
2023-10-10 13:51:48 +02:00
d884580432 dependency: bump go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc from 0.44.0 to 0.45.0
Signed-off-by: Sharath Sivakumar <mailssr9@gmail.com>
2023-10-10 11:50:54 +02:00
c94deb9511 dependency: bump github.com/prometheus/client_model from 0.4.1-0.20230718164431-9a2bf3000d16 to 0.5.0
Signed-off-by: Sharath Sivakumar <mailssr9@gmail.com>
2023-10-10 11:49:36 +02:00
1b1c42a7aa dependency: bump golang.org/x/net from 0.15.0 to 0.16.0
Signed-off-by: Sharath Sivakumar <mailssr9@gmail.com>
2023-10-10 11:49:35 +02:00
16e19a9547 Merge pull request #16269 from dusk125/refactor-revision
Refactor common revision code to pkg
2023-10-10 10:16:58 +02:00
395376d3ab Refactor common revision code to pkg
Signed-off-by: Allen Ray <alray@redhat.com>
2023-10-09 14:53:16 -04:00
c1fb2c2316 Use default embed config in e2e tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-05 14:17:45 +02:00
1c5289dd73 Merge pull request #16677 from serathius/revert-13525
Revert "etcd server shouldn't wait for the ready notification infinitely on startup"
2023-10-04 11:49:11 +02:00
074d79652d depdendency: bump github.com/prometheus/client_golang from 1.16.0 to 1.17.0.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-10-04 11:10:01 +13:00
aac8919b17 depdendency: bump go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc from 1.18.0 to 1.19.0.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-10-04 11:06:38 +13:00
e31de5e3c1 Revert "etcd server shouldn't wait for the ready notification infinitely on startup"
This reverts commit 1713dc67b5.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-03 21:37:18 +02:00
50fb919318 Make AddEmbedFlags functon a method on embed.Config
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-02 13:53:38 +02:00
d98faeef82 Refactor registering flags to separate AddEmbedFlags function for future reuse
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-01 09:58:27 +02:00
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
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
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
cfd35afe93 Merge pull request #16636 from ahrtr/grpc_20230925
dependency: bump some dependencies
2023-09-26 12:31:09 +01:00
4d486a2332 bump go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc from 1.17.0 to 1.18.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-25 21:00:55 +01:00
10cddaaf7c bump go.opentelemetry.io/otel/sdk from 1.17.0 to 1.18.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-25 20:59:30 +01:00
df7f2d93f8 dependency: bump google.golang.org/grpc from 1.58.1 to 1.58.2
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-25 20:53:56 +01:00
4704a5af3a *: fix unused issue
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-25 19:37:18 +08:00
896d161d16 *: fix stylecheck linter
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-25 19:14:01 +08:00
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
e1ebc260a9 Merge pull request #16628 from fuweid/fix-goimports
*: fix goimports linter
2023-09-22 10:26:14 +01:00
443ee6eb40 dependency: bump go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc from 0.43.0 to 0.44.0
Signed-off-by: sharathsivakumar <mailssr9@gmail.com>
2023-09-21 20:07:07 +02:00
2048a638fc dependency: bump google.golang.org/grpc from 1.58.0/1.57.0 to 1.58.1
Signed-off-by: sharathsivakumar <mailssr9@gmail.com>
2023-09-21 19:54:54 +02:00
eef790399e dependency: bump go.uber.org/zap from 1.25.0 to 1.26.0
Signed-off-by: sharathsivakumar <mailssr9@gmail.com>
2023-09-21 19:41:16 +02:00
aa97484166 *: enable goimports in verify-lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-21 21:14:09 +08:00
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
df86cadd8b *: fix ineffassign lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-19 22:19:19 +08:00
36403e3909 Merge pull request #16608 from fuweid/fix-shadow-vet
*: fix govet-shadow lint
2023-09-19 15:09:05 +01:00
5e3910d96c *: fix govet-shadow lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-19 20:24:01 +08:00
ea2d60cad7 dependency: bump grpc-gateway from 2.17.1 to 2.18.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-19 12:17:22 +01:00
8eba295bc5 Resolve review comments: add some comments to clarify some confusion script or code
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-18 12:09:46 +01:00
5444cdae69 remove all usage of v1 grpc-gateway
1. Manually updated go source file to remove the usage of v1 grpc-gateway;
2. Execute ./scripts/fix.sh

Signed-off-by: Benjamin Wang <wachao@vmware.com>
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-18 11:22:16 +01:00