treesvc: Disable service config query
Some checks failed
DCO action / DCO (pull_request) Failing after 34s
Tests and linters / Run gofumpt (pull_request) Successful in 1m5s
Vulncheck / Vulncheck (pull_request) Successful in 1m10s
Build / Build Components (pull_request) Successful in 1m58s
Pre-commit hooks / Pre-commit (pull_request) Successful in 2m47s
Tests and linters / Staticcheck (pull_request) Successful in 2m44s
Tests and linters / Tests (pull_request) Successful in 2m45s
Tests and linters / Tests with -race (pull_request) Successful in 3m20s
Tests and linters / Lint (pull_request) Successful in 3m42s
Tests and linters / gopls check (pull_request) Successful in 3m38s

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!).

SDK client for the main API uses these options by default.

Refs TrueCloudLab/frostfs-sdk-go#342

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2025-03-06 15:13:38 +03:00
parent 46840f16a9
commit 7b2f3c2602
Signed by: fyrchik
SSH key fingerprint: SHA256:m/TTwCzjnRkXgnzEx9X92ccxy1CcVeinOgDb3NPWWmg
3 changed files with 3 additions and 0 deletions

View file

@ -39,6 +39,7 @@ func _client() (tree.TreeServiceClient, error) {
tracing.NewStreamClientInterceptor(),
),
grpc.WithDefaultCallOptions(grpc.WaitForReady(true)),
grpc.WithDisableServiceConfig(),
}
if !strings.HasPrefix(netAddr.URIAddr(), "grpcs:") {

View file

@ -110,6 +110,7 @@ func (c *clientCache) dialTreeService(ctx context.Context, netmapAddr string) (*
),
grpc.WithContextDialer(c.ds.GrpcContextDialer()),
grpc.WithDefaultCallOptions(grpc.WaitForReady(true)),
grpc.WithDisableServiceConfig(),
}
if !netAddr.IsTLSEnabled() {

View file

@ -355,6 +355,7 @@ func (*Service) createConnection(a network.Address) (*grpc.ClientConn, error) {
),
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithDefaultCallOptions(grpc.WaitForReady(true)),
grpc.WithDisableServiceConfig(),
)
}