fix(helm): drop unresolvable _grpc._tcp. SRV prefix from query-backen…#5232
Open
nissessenap wants to merge 2 commits into
Open
fix(helm): drop unresolvable _grpc._tcp. SRV prefix from query-backen…#5232nissessenap wants to merge 2 commits into
nissessenap wants to merge 2 commits into
Conversation
…d.address default In v2 mode the chart rendered the query-backend client address as `dns:///_grpc._tcp.<headless>:9095`. That address is handed straight to grpc-go's stock `dns` resolver, which does an A/AAAA lookup on the literal host. It only performs SRV lookups for grpclb (`_grpclb._tcp.<host>`), and `EnableSRVLookups` is false by default. The host `_grpc._tcp.<headless>` has an SRV record but no A/AAAA record, so the resolver yields zero endpoints. Combined with the client's `waitForReady: true` service config, every read RPC (SelectMergeStacktraces, SelectSeries) parks until the 30s call timeout and returns HTTP 499, while the query-backend logs nothing. Fixes grafana#5229 Signed-off-by: Edvin Norling <edvin.norling@kognic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
Fixes #5229: in v2 Helm mode, every profile-data read query (
SelectMergeStacktraces,SelectSeries) hangs ~30s and returns HTTP 499, so flame graphs render empty. Thequery-backendcomponent logs nothing — the request never reaches it.Root cause
The chart rendered:
-query-backend.address=dns:///_grpc._tcp.-headless.$(NAMESPACE_FQDN):9095
This is passed directly to the query-backend client's
grpc.NewClientwith grpc-go's stockdnsresolver. That resolver does an A/AAAA lookup on the literal host; it only does SRV for grpclb (_grpclb._tcp.<host>), andEnableSRVLookupsisfalseby default._grpc._tcp.<headless>has an SRV record but no A/AAAA record → zero endpoints. With the client'swaitForReady: trueservice config, calls park until the 30s timeout → HTTP 499.Metadata RPCs (
ProfileTypes,Series,LabelNames, ...) are unaffected because the metastore client uses its ownkubernetes://discovery resolver, not grpc-go's.Fix
Drop the
_grpc._tcp.prefix so the address resolves the headless service's plain A records:-query-backend.address=dns:///-headless.$(NAMESPACE_FQDN):9095
The headless service is
clusterIP: None, so this resolves all ready pod IPs, and the client's existinground_robinLB policy balances across them.Microservices considered
Both single-binary v2 and microservices v2 rendered the same broken default, so microservices reads were affected too (just not yet reported). The fix is correct for both: single-binary resolves to one pod, microservices round-robins across N
query-backendreplicas via the headless A records. Confirmed in the regeneratedrendered/*.yaml.kubernetes:///dnssrvnoa+are not options for this address — the query-backend client uses a baregrpc.NewClientwith no custom resolver registered (only the metastore client has one).Backward compatibility
Using
extraArgsworkaround are unaffected: the chart still skips its default whenquery-backend.addressis set inextraArgs, so no duplicate flag. After upgrading they can drop the override.