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

RateLimitPolicy does not work after being modified #388

Closed
trepel opened this issue Nov 20, 2024 · 2 comments · Fixed by #389
Closed

RateLimitPolicy does not work after being modified #388

trepel opened this issue Nov 20, 2024 · 2 comments · Fixed by #389
Assignees
Labels
kind/bug Something isn't working

Comments

@trepel
Copy link

trepel commented Nov 20, 2024

Overview

It seems that after RateLimitPolicy (RLP) CR is modified - e.g. limit is changed to some other number - it stops working. By that I mean that the 429 Too Many Request is never returned, one receives as many 200 OKs as they want.

The only suspicious entry from log is found in Limitador pod log. The following entry appears in that log after each hit of API endpoint that is rate-limited by modified RLP:

thread 'main' panicked at limitador/src/storage/in_memory.rs:106:58:                                      
called `Option::unwrap()` on a `None` value                                                               

Once limit it reverted back to original value everything starts working as expected.

This has been discovered using Kuadrant nightly build from November 20

Steps to reproduce

Create 1 GW, 1 HTTPRoute and one RLP attached to GW (does not matter, could be also attached to HTTPRoute instead). Make sure everything works as expected and the 429 is returned after expected no. of 200s.
Edit the RLP so that different no. of requests is allowed.
Try again, this time 429 is not returned as expected, one continues getting 200s. And see Limitador pod logs for the entry mentioned above.

@trepel trepel added the kind/bug Something isn't working label Nov 20, 2024
@alexsnaps
Copy link
Member

Is this happening with 1.6 as well?

@alexsnaps alexsnaps transferred this issue from Kuadrant/kuadrant-operator Nov 20, 2024
@alexsnaps
Copy link
Member

Seems to be a v2.0.0-dev only issue, probably (partially?) related to #344 around these changes: 0c08ce4

@alexsnaps alexsnaps linked a pull request Nov 21, 2024 that will close this issue
@alexsnaps alexsnaps moved this from In Progress to Ready For Review in Kuadrant Nov 21, 2024
@github-project-automation github-project-automation bot moved this from Ready For Review to Done in Kuadrant Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants