-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Handle InvalidParameterValue as well for PD fallback #31016
Conversation
/test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix, I note that I mentioned in the previous PR a sort lack of testing in this area. Would it be worth to write some unit tests (even some small mocks) just to validate the behavior here?
cilium#30536 prematurely concluded that AWS now uses InsufficientCidrBlocks to indicate the subnet is out of prefixes. Looks like AWS still uses InvalidParameterValue and "There aren't sufficient free Ipv4 addresses or prefixes" to indicate subnet is at capacity. In addition to this InsufficientCidrBlocks is returned when subnet is at capacity potentially due to fragmentation. In either case, it's worth trying to fallback since /32 IPs might still be available compared to /28. See PR for details from AWS support ticket. Signed-off-by: Hemanth Malla <hemanth.malla@datadoghq.com>
22eb7c6
to
db51f68
Compare
@christarazi updated the prefix delegation unit test to cover the fallback case. This wouldn't really catch scenarios we're hitting here (new error codes), but the fallback feature itself should now be tested based on mocked API implementation.
|
Signed-off-by: Hemanth Malla <hemanth.malla@datadoghq.com>
db51f68
to
56dab27
Compare
/test |
#30536 prematurely concluded that AWS now uses InsufficientCidrBlocks to indicate the subnet is out of prefixes. Looks like AWS still uses
InvalidParameterValue
andThere aren't sufficient free Ipv4 addresses or prefixes
to indicate subnet is at capacity. However, when subnet is at capacity potentially due to fragmentation,InsufficientCidrBlocks
is returned. In either case, it's worth trying to fallback since /32 IPs might still be available compared to /28. Details from the support ticket we opened with AWS for clarification