You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d31b5ff
Browse filesBrowse the repository at this point in the historyBrowse files
authored
network: scope routed network/VPC subnets to a zone (#14421)
* network: scope routed network/VPC subnets to a zone
The ip4_guest_subnet_network_map table had no zone column, so the subnet
bookkeeping for routed networks and VPCs was global. Creating a routed VPC
or network with a CIDR already used in another zone failed with
"The subnet is in use", even though the two zones are independent.
Add a nullable data_center_id column to ip4_guest_subnet_network_map and
scope the subnet lookup and the parentless overlap check by zone, so the
same CIDR can be used once per zone. Existing rows are backfilled from
their parent zone subnet, VPC or network.
Fixes#14419
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017rnv8vT6LQSKfwkzp8tvg9
* network: list and report routed subnets by their own zone
listIpv4SubnetsForGuestNetwork resolved the zoneid filter through
dc_ip4_guest_subnets, so a subnet with no parent never matched, and a zone
with no zone-level subnet returned an empty list. The response derived the
zone the same way, leaving parentless subnets with no zone at all.
Now that the record carries its zone, filter on data_center_id directly and
fall back to it when building the response.
Addresses review feedback on #14419.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017rnv8vT6LQSKfwkzp8tvg9
---------
Co-authored-by: Prashanth Reddy <prashanth.reddy@shapeblue.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
0 commit comments