-
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 more invalid RDS responses #4120
Conversation
- unrecognized path specifier - including Regex (not SafeRegex) from xds v2 - unrecognized header matcher specifier - empty action weighted clusters
xds/internal/client/client_xds.go
Outdated
if totalWeight == 0 { | ||
return nil, fmt.Errorf("route %+v, action %+v, has no cluster in WeightedCluster action", r, a) | ||
} |
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.
Is a zero weight for a cluster valid?
If so, then is total weight of zero valid if there are clusters?
If not, should we nack if we get a zero value on line 330?
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.
C and Java have different behaviors.
C would ignore weight 0, and if there is no remaining cluster, NACK.
Java processes weight 0 as normal.
Need to find what Envoy does.
Will make the fix after there's a conclusion.
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.
Made the change to ignore 0-weight clusters. And will still NACK if there's no clusters remaining after filtering.
fixes #4093