]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Add missing interface to populate subnets method
authorKevin Benton <blak111@gmail.com>
Fri, 24 Apr 2015 13:52:21 +0000 (06:52 -0700)
committerKevin Benton <blak111@gmail.com>
Fri, 24 Apr 2015 13:52:21 +0000 (06:52 -0700)
Change Ib46f685d72eb61ecbaa2869e28fb173cd6d49552 introduced
and optimization to defer the lookup of interface subnet info
until all of the router interfaces were collected. However,
it didn't add the DVR SNAT interface to the list of interfaces
to populate subnet info so it broke DVR.

This patch corrects the behavior by adding the DVR SNAT interface
to the list of ports that need subnet info populated.

Change-Id: I32054ff00bf6992c5dedd21735b6d2afd15c5fb3

neutron/db/l3_dvr_db.py

index 2374361a569f1927d968bcec07fa2a74d1671da8..241fa85a3700d4ba43aee34756d442427de94e67 100644 (file)
@@ -459,6 +459,8 @@ class L3_NAT_with_dvr_db_mixin(l3_db.L3_NAT_db_mixin,
                 ports_to_populate.append(router['gw_port'])
             if router.get(l3_const.FLOATINGIP_AGENT_INTF_KEY):
                 ports_to_populate += router[l3_const.FLOATINGIP_AGENT_INTF_KEY]
+            if router.get(SNAT_ROUTER_INTF_KEY):
+                ports_to_populate += router[SNAT_ROUTER_INTF_KEY]
         ports_to_populate += interfaces
         self._populate_subnets_for_ports(context, ports_to_populate)
         self._process_interfaces(routers_dict, interfaces)