-
Notifications
You must be signed in to change notification settings - Fork 66
[ip-pools] Allow multiple default IP pools per silo #9561
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
base: main
Are you sure you want to change the base?
Conversation
7f3a5b6 to
661d029
Compare
Previously, each silo could only have one default IP pool. This change allows one default pool per (pool_type, ip_version) combination, enabling silos to have separate defaults for: - Unicast IPv4 - Unicast IPv6 - Multicast IPv4 - Multicast IPv6 This work previously branched off #9451, but is now off `main`, involving changes that have to do with the mcast lifecycle changes. Includes: - Each default can now be set or unset and demoted independently. Unsetting the unicast IPv4 default does not affect the multicast IPv4 default, for example. - Add `pool_type` and `ip_version` columns to `ip_pool_resource` (denormalized from parent `ip_pool` for unique index) - Replace unique index with partial index on (resource_id, pool_type, ip_version) WHERE is_default = true - Rename `IpPoolResourceLink` to `IncompleteIpPoolResource` to reflect that pool_type/ip_version are actually populated by the linking query - Add `ip_version` field to API params for default pool disambiguation - API versioning for backwards compatibility with older clients
661d029 to
c11aae0
Compare
|
FYI, even without the implicit lifecycle work, this still has mcast changes (as mcast is on |
bnaecker
left a comment
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 splitting this out! Seems pretty straightforward to me, just a couple of quick questions.
| &instance_lookup, | ||
| ip_to_create.into_inner().pool, | ||
| pool, | ||
| ip_version, |
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.
It seems like somewhere we want to fail if you provide an IP version and a pool, and the version you gave doesn't match the version of the pool. Is that the case?
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.
I need to add this match check, good point.
| -- IPv6, preparing the schema for future multicast support. | ||
|
|
||
| -- Drop the old single-default constraint | ||
| DROP INDEX IF EXISTS omicron.public.one_default_ip_pool_per_resource; |
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.
I'm not certain that it matters, but we have generally had only one statement per SQL update file. I'd probably split these and the contents of up03.sql into two files.
|
@zeeshanlakhani Let me know if you need anything else here. I'd really like to get this merged so we can move forward on the IPv6 integration work. |
Previously, each silo could only have one default IP pool. This change allows one default pool per (pool_type, ip_version) combination, enabling silos to have separate defaults for:
This work previously branched off #9451, but is now off
main, NOT involving changes that have to do with the mcast lifecycle work. This supersedes #9452.Includes:
pool_typeandip_versioncolumns toip_pool_resource(denormalized from parentip_poolfor unique index)IpPoolResourceLinktoIncompleteIpPoolResourceto reflect that pool_type/ip_version are actually populated by the linking queryip_versionfield to API params for default pool disambiguation