]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Fix dvr update for subnet attach multi subnets
authorlzklibj <lzklibj@cn.ibm.com>
Mon, 2 Mar 2015 10:13:41 +0000 (02:13 -0800)
committerCarl Baldwin <carl@ecbaldwin.net>
Wed, 9 Sep 2015 20:14:43 +0000 (20:14 +0000)
commit24fa37e05544316b58357b753360b147878e5d94
treebb8b629c9d8f071a85a910ba4f30415c2c9a37cd
parent5d5aa1b045bc65e4ae27a05c703046026d1ca78e
Fix dvr update for subnet attach multi subnets

Fix method dvr_update_router_addvm to notify every
router attached to subnet where the vm will boot
on.

In dvr case, when a subnet only attaches to one router,
the subnet will only have one distributed router interface,
which device_owner is "network:router_interface_distributed".
So in this case, get_ports in this method will only get
one port, and it should be unnecessary to break in for loop.

But when a subnet attaches multiple routers, get_ports in
this method will return all distributed router interfaces
and the routers hold those interfaces should be notified
when an instance booted on the subnet. So it should also
be unnecessary to break in for loop.

Change-Id: I3a5808e5b6e8b78abd1a5b924395844507da0764
Closes-Bug: #1427122
Co-Authored-By: Ryan Moats <rmoats@us.ibm.com>
neutron/db/l3_dvrscheduler_db.py
neutron/tests/unit/scheduler/test_l3_agent_scheduler.py