]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Return from check_ports_exist_on_l3agent if no subnet found
authorEd Bak <ed.bak2@hp.com>
Mon, 9 Feb 2015 23:13:18 +0000 (23:13 +0000)
committerEd Bak <ed.bak2@hp.com>
Tue, 7 Apr 2015 14:03:19 +0000 (14:03 +0000)
commit760fe6a8fabc921e75367b5f02bab4fc326b8115
tree8c26147208f7e6ba4a05c3f86c351e7b6fe9f1ea
parent21bef562c23d96fe41daeedeb43c0bb2d1c53ed0
Return from check_ports_exist_on_l3agent if no subnet found

The call to get_subnet_ids_on_router can return an empty list.
If the subnet_ids list is empty, the subsequent call to get
the ports on a subnet returns all ports.  If this occurs
when doing a remove_router_interface, the performance
of a remove_router_interface degrades significantly.  This change
returns immediately from check_ports_exist_on_l3agents if no
subnet is found.  A new unit test has been added to cover
the specific case of returning immediately without calling
get_ports when a remove_router_interface operation is performed.

Change-Id: I247d3bae152ab4f8ab7e00bd24d878eb08dca1ba
Closes-Bug: #1420032
Depends-On: I15bbf16fd4378c6431e9da8942d0968e7a012a91
neutron/db/l3_agentschedulers_db.py
neutron/tests/unit/scheduler/test_l3_agent_scheduler.py