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

fix: Envoy rejects XDS at runtime losing all routes on restart #2576

Conversation

davidalger
Copy link
Contributor

What type of PR is this?

fix: Envoy rejects XDS at runtime losing all routes on restart

What this PR does / why we need it:

By default Envoy rejects regex routes with a max program size > 100, which is very easy to trigger with simple regex matches:

rejected: regex '^/api/v1/object/[\w]{32}/action$' RE2 program size of 107 > max program size of 100

When envoy restarts, it loses all it's config resulting in 404 responses to all requests. This change lifts the deprecated validation done by max_program_size leaving in place a warning threshold which can be used to monitor for high complexity regex routes without putting stability of the system at risk. See thread on the related issue for full details.

Which issue(s) this PR fixes:

Relates #2543

@davidalger davidalger requested a review from a team as a code owner February 7, 2024 21:41
Copy link
Contributor

@arkodg arkodg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks !

@arkodg arkodg requested review from a team February 7, 2024 22:00
Copy link

codecov bot commented Feb 7, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (f21f9ff) 63.94% compared to head (7e6e694) 63.97%.
Report is 1 commits behind head on main.

Files Patch % Lines
...frastructure/kubernetes/proxy/resource_provider.go 50.00% 0 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2576      +/-   ##
==========================================
+ Coverage   63.94%   63.97%   +0.03%     
==========================================
  Files         117      117              
  Lines       18057    18061       +4     
==========================================
+ Hits        11546    11554       +8     
+ Misses       5758     5755       -3     
+ Partials      753      752       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@shawnh2 shawnh2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@arkodg arkodg merged commit 9b37f59 into envoyproxy:main Feb 8, 2024
17 of 19 checks passed
@davidalger davidalger deleted the algerdev/issue-2543-fix-regexp-rejection-error branch February 8, 2024 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants