Explicit error message when failing to create the health check stream due to failing per-RPC credentials calls #8030
Labels
Area: Client
Includes Channel/Subchannel/Streams, Connectivity States, RPC Retries, Dial/Call Options and more.
Type: Behavior Change
Behavior changes not categorized as bugs
Type: Feature
New features or improvements in behavior
Use case(s) - what problem will this feature solve?
When health check is enabled (via
"healthCheckConfig": {"serviceName": ""}
in the service config) and the client fails to create a stream, the channel remains inCONNECTING
state and no error message is output. This makes the task of troubleshooting problems caused by creating the health check watch stream hard, as there are neither logs nor RPC errors, and RPC typically fail with deadline exceeded (if a deadline is set).The code that swallows errors when creating the health check
Watch
stream is here:grpc-go/health/client.go
Lines 74 to 78 in fbff2ab
grpc-go/balancer_wrapper.go
Lines 362 to 365 in 38a8b9a
grpc-go/stream.go
Lines 1233 to 1236 in e912015
grpc-go/stream.go
Lines 1253 to 1255 in e912015
grpc-go/stream.go
Lines 353 to 358 in e912015
GetRequestMetadata
to get per-RPC credentials fails (that is the case I ran into).Proposed Solution
Transition the subchannel to
TRANSIENT_FAILURE
if we failed to create the watch stream. Continue the retry loop.Alternatives Considered
If changing the behavior of of health checks when per RPC credentials fail is not desirable, at least logging through channelz would be nice.
The text was updated successfully, but these errors were encountered: