Skip to content

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