]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Do not delete subnets with IPs on router interfaces
authorSalvatore Orlando <salv.orlando@gmail.com>
Fri, 8 Mar 2013 17:10:38 +0000 (18:10 +0100)
committerSalvatore Orlando <salv.orlando@gmail.com>
Fri, 8 Mar 2013 21:20:41 +0000 (22:20 +0100)
commitb50e66f1863416c5c65d05f294f7b8a519dfb78c
tree73423ca189b5eaa5a8dfacfe6ebdd37b0f6d87e2
parent0f38e10810afff71261be3dab5a501d680d6b72d
Do not delete subnets with IPs on router interfaces

Bug 1152171

This patch simply causes a 409 to be returned when attempting to
delete a subnet which has IPs on ports whose device_owner is
network:router_interface

This does not address a similar problem that arises when the ips for
a port owned by a router_interface are updated. This problem is hidden
when updating a port which has been assigned the gateway_ip by an
exception in the IP recycling process. However, it will hit when the
port was explicitly added to the router, since it will have an ip
different from the subnet's gateway ip.

Change-Id: I38dfd2639acd03db8d3f1f933495a456a4a8724f
quantum/db/db_base_plugin_v2.py
quantum/tests/unit/openvswitch/test_agent_scheduler.py
quantum/tests/unit/test_l3_plugin.py