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

xds: NACK more invalid RDS responses #4120

Merged
merged 2 commits into from
Jan 5, 2021
Merged

Conversation

menghanl
Copy link
Contributor

@menghanl menghanl commented Dec 17, 2020

  • unrecognized path specifier
    • including Regex (not SafeRegex) from xds v2
  • unrecognized header matcher specifier
  • empty action weighted clusters

fixes #4093

- unrecognized path specifier
  - including Regex (not SafeRegex) from xds v2
- unrecognized header matcher specifier
- empty action weighted clusters
@menghanl menghanl requested a review from dfawley December 17, 2020 18:41
@menghanl menghanl added this to the 1.35 Release milestone Dec 17, 2020
Comment on lines 337 to 339
if totalWeight == 0 {
return nil, fmt.Errorf("route %+v, action %+v, has no cluster in WeightedCluster action", r, a)
}
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

@dfawley dfawley assigned menghanl and unassigned dfawley Dec 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

xds: client should NACK RDS response with regex (not safe_regex)
2 participants