-
Notifications
You must be signed in to change notification settings - Fork 39
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
Restrict IP pool size to prevent CRDB memory budget exceeded error #5651
Comments
There has to be a way to make this endpoint use constant memory regardless of the range size. |
One way to do that might be similar to what I did for VPCs. We basically searching in limited chunks until we find a matching IP, rather than scanning the whole range in one query. On 27 Apr 2024, at 17:33, David Crespo ***@***.***> wrote:
There has to be a way to make this endpoint use constant memory regardless of the range size.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
omicron/nexus/db-queries/src/db/queries/external_ip.rs Lines 267 to 282 in cfa6bd9
|
Here's the VPC fix, which could be implemented for this case as well: #4298 |
Played around with this on Friday. The fix I used for VPCs won't work here, since this isn't a |
- Adds a server kind enum, used to distinguish which API server is running any particular handler. - Wraps the existing `ServerContext` into a higher-level `ApiContext` type, which includes the former in addition to the kind of server handling the request. - Fixes #5651
I hit the error accidentally while blindly plugging in a large CIDR start/end IP range, e.g. 240.0.0.1 - 240.4.255.254.
Nexus failed the request during floating IP create request against such a large IP range in the pool I chose:
This is very much a corner case but having some upfront validation on the pool size will be a good thing. I poked a bit into what that maximum is and it looks like
/14
works fine and covers an insanely large number of addresses.The text was updated successfully, but these errors were encountered: