]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Change check_ports_exist_on_l3agent to pass the subnet_ids
authorSwaminathan Vasudevan <swaminathan.vasudevan@hp.com>
Thu, 5 Nov 2015 02:02:09 +0000 (18:02 -0800)
committerSwaminathan Vasudevan <swaminathan.vasudevan@hp.com>
Mon, 30 Nov 2015 17:49:37 +0000 (17:49 +0000)
commit062ad0a0a62ab49bd0c27e73fbe93d739f82f410
treee9888e22484499112b97d09b45e3ccf7cd259ace
parent21ca26e50acc29125281116e23579982f720c05d
Change check_ports_exist_on_l3agent to pass the subnet_ids

The get_subnet_ids_on_router is called for every
available l3agent in check_ports_exist_on_l3agent.
This introduces un-necessary call to the same
function multiple times which is expensive since it
calls get_ports internally.

In large scale the time taken to schedule a VM
on a given N-Node increases.

By passing the subnet_ids to check_ports_exist_on_l3agent
we would be only calling once get_subnet_ids_on_router in
the get_l3_agent_candidates.

This patch addresses the above problem by calling
get_subnet_ids_on_router just once.

Change-Id: I9d130f98e07bfe571eee32b827ff9af4010ff0fb
Related-Bug: #1513678
neutron/db/l3_agentschedulers_db.py
neutron/db/l3_dvr_db.py
neutron/tests/unit/db/test_agentschedulers_db.py
neutron/tests/unit/db/test_l3_dvr_db.py
neutron/tests/unit/scheduler/test_l3_agent_scheduler.py