Open ahrtr opened 1 week ago
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: ahrtr
The full list of commands accepted by this bot can be found here.
The pull request process is described here
Please anyone feel free to work on this on top of this PR.
:warning: Please install the to ensure uploads and comments are reliably processed by Codecov.
Attention: Patch coverage is 57.14286%
with 3 lines
in your changes missing coverage. Please review.
Project coverage is 68.73%. Comparing base (
7ab7612
) to head (fa2078f
). Report is 4 commits behind head on main.:exclamation: Current head fa2078f differs from pull request most recent head a9f846b
Please upload reports for the commit a9f846b to get more accurate results.
Files with missing lines | Patch % | Lines |
---|---|---|
server/etcdmain/grpc_proxy.go | 0.00% | 3 Missing :warning: |
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
The client side sees a grpc error, not sure why.
$ ./bin/etcdctl get k1
2024/11/12 13:49:23 ERROR: [core] [Channel #1 SubChannel #2]Health check is requested but health check function is not set.
I am pretty sure that we have registered the health service and set the healthpb.HealthCheckResponse_SERVING
status. @dfawley @easwars @aranjans can you please share some thought on this?
https://github.com/etcd-io/etcd/blob/7ab761246cc449ddfc630001fb2caff160eb4ee3/server/etcdserver/api/v3rpc/grpc.go#L77-L79
$ ./bin/etcdctl get k1
2024/11/12 13:49:23 ERROR: [core] [Channel #1 SubChannel #2]Health check is requested but health check function is not set.
@ahrtr Side effect of importing import _ "google.golang.org/grpc/health"
would register the health check function here and mentioned in the feature example
@ahrtr
The client side sees a grpc error, not sure why.
Maybe you need an import that sets internal.HealthCheckFunc
Any danger to roll this out enabled by default? Do we need a config option? I think, yes. The change is minimal but if there are any bugs in grpc health impl, we might need a way to disable.
Thanks both. It's a bad pattern to have a blank-import in a non-main package,
internal/resolver/resolver.go:18:2: blank-imports: a blank import should be only in a main or test package, or have a comment justifying it (revive)
_ "google.golang.org/grpc/health"
/retest
@ahrtr: The following test failed, say /retest
to rerun all failed tests or /retest-required
to rerun all mandatory failed tests:
Test name | Commit | Details | Required | Rerun command |
---|---|---|---|---|
pull-etcd-integration-1-cpu-amd64 | a9f846b650452ce9621758919f685eae05aad76a | link | true | /test pull-etcd-integration-1-cpu-amd64 |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
@arjan-bal
Any danger to roll this out enabled by default? Do we need a config option?
YES, we definitely need a config option for this; otherwise it will be a breaking change. If the server side health check isn't enabled, the client will will get an error something like below,
2024/11/13 07:39:59 ERROR: [core] [Channel #1 SubChannel #2]Subchannel health check is unimplemented at server side, thus health check is disabled
Please anyone feel free to continue to work on this task on top of this PR,
WithGRPCHealthCheckEnabled
for the client side;Please anyone feel free to continue to work on this task on top of this PR
assigned to myself
assigned to myself
thx
Followup to https://github.com/etcd-io/etcd/pull/16278
Previously the default gRPC service config for the resolver is
{"loadBalancingPolicy": "round_robin"}
.https://github.com/etcd-io/etcd/blob/7ab761246cc449ddfc630001fb2caff160eb4ee3/client/v3/internal/resolver/resolver.go#L44
Now I propose to change the default service config to
{"loadBalancingPolicy": "round_robin"}, "healthCheckConfig": {"serviceName": ""}
. The benefit is thatloadBalancingPolicy
isround_robin
? @dfawley But I am not whether is there any performance penalty? Probably we need to run rw-heatmaps to double confirm.