Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XdsNameResolver blindly propagates XdsClient errors #8950

Closed
ejona86 opened this issue Feb 28, 2022 · 3 comments · Fixed by #8953
Closed

XdsNameResolver blindly propagates XdsClient errors #8950

ejona86 opened this issue Feb 28, 2022 · 3 comments · Fixed by #8953
Assignees
Labels
Milestone

Comments

@ejona86
Copy link
Member

ejona86 commented Feb 28, 2022

If a watch in XdsClient fails, XdsNameResolver will propagate the error directly to the channel without adding context and without setting a proper status.

A user saw

 [Channel<2441>: (xds:///<snip>)] Failed to resolve name. status=Status{code=NOT_FOUND, description=Requested entity was not found., cause=null}

And accompanying RPC failures:

Caused by: java.lang.RuntimeException: io.grpc.StatusRuntimeException with message: NOT_FOUND: Requested entity was not found.

That RPC failure is very bad, because it isn't clear it is from XdsNR and should be UNAVAILABLE.

As seen in b/221844501.

@ejona86 ejona86 added the bug label Feb 28, 2022
@ejona86 ejona86 added this to the v1.46 milestone Feb 28, 2022
@YifeiZhuang
Copy link
Contributor

YifeiZhuang commented Feb 28, 2022

Hi @ejona86 , curious how did you encounter the error? Shall we log the real error and always throw "UNAVAILABLE" to the client, while copying the cause and description details?

@ejona86
Copy link
Member Author

ejona86 commented Feb 28, 2022

At the least we should wrap and repackage the error. For example: "UNAVAILABLE: Unable to load Route 'Foo'. xDS server returned: NOT_FOUND: Requested entity was not found." This is unrelated to logging.

@ejona86
Copy link
Member Author

ejona86 commented Mar 9, 2022

This is part of the (now-available) v1.45.0 release.

ejona86 added a commit to ejona86/grpc-java that referenced this issue Mar 22, 2022
This is similar to 2a45524 (for grpc#8950) but for additional similar cases.
ejona86 added a commit that referenced this issue Mar 23, 2022
This is similar to 2a45524 (for #8950) but for additional similar cases.
ejona86 added a commit to ejona86/grpc-java that referenced this issue Mar 24, 2022
This is similar to 2a45524 (for grpc#8950) but for additional similar cases.
ejona86 added a commit to ejona86/grpc-java that referenced this issue Mar 24, 2022
This is similar to 2a45524 (for grpc#8950) but for additional similar cases.
ejona86 added a commit that referenced this issue Mar 24, 2022
This is similar to 2a45524 (for #8950) but for additional similar cases.
ejona86 added a commit that referenced this issue Mar 24, 2022
This is similar to 2a45524 (for #8950) but for additional similar cases.
temawi pushed a commit to temawi/grpc-java that referenced this issue Apr 8, 2022
This is similar to 2a45524 (for grpc#8950) but for additional similar cases.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants