By default, gRPC fetches TXT report while resolving a domain.
0914bba6c5/internal/resolver/dns/dns_resolver.go (L336)
This leads to a hanging dial if DNS is unavailable, even though the host
may be specified in `/etc/hosts` (hello, localhost!).
Use `grpc.WithDisableServiceConfig()` to override the default.
This option seems impossible to override with `WithGRPCDialOpts()`,
but we do not use service config anyway.
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
According to https://pkg.go.dev/context#pkg-variables, ContextCancelled
should be returned when the context is canceled for some reason other
than its deadline passing. So creating gRPC stream with dial timeout fits
better for context.DeadlineExceeded.
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
Since api was moved from `TrueCloudLab/frostfs-api-go` to sdk,
moving changes from TrueCloudLab/frostfs-api-go#125 here.
Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
* `c.conn` may be already invalidated but the rpc client can't detect this.
`NewStream` may hang trying to open a stream with invalidated connection.
Using timer with `dialTimeout` for `NewStream` fixes this problem.
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>