-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
xds: NACK missing route specifier server side #4925
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this specified anywhere? In the gRFC or somewhere else?
I'm wondering why we thought it's OK to be nil.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And it would be OK to delete this
case
? The default below would then handle nil.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, we should probably keep that. The client side returns a special error for nil
grpc-go/xds/internal/xdsclient/xds.go
Lines 153 to 154 in 670c133
Change the comment of these two fields to
exactly one of RouteConfigName and InlineRouteConfig is set
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the processing of the Route Configuration was added due to RBAC A36 has language on validations once Route Configuration is processed server side. However, there was no explicit language on a nil RouteSpecifier/a missing Route Configuration (usually when RDS fails, which after talking with Eric we have the right behavior which is to ACK resource, but RPC's fail (no calling goodupdate.Fire()). However, all my RBAC code didn't handle the case of a nil RouteSpecifier, which lead to issue #4924. Luckily, Eric pointed to the fact that the RouteSpecifier is in fact required in the Envoy proto: https://github.com/envoyproxy/envoy/blob/56e8c45b1b340c4a4f8f02ec2488354c31806d59/api/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto#L317, so this fix fixes the bug in RBAC implementation as well. Changed comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing I mentioned in the issue thread I think is important to bring up, is that I think that NACKing a missing RouteSpecifier is fair for users since the addition of RBAC added the addition of a valid route configuration (matching vh + route) for RPC's to proceed normally, and this will communicate to them the delta they need to make in their control plane resources. Especially if we enable RBAC by default.