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.
Related-Bug: #1513678
Conflicts:
neutron/tests/unit/db/test_agentschedulers_db.py
Change-Id: I9d130f98e07bfe571eee32b827ff9af4010ff0fb
(cherry picked from commit 062ad0a0a62ab49bd0c27e73fbe93d739f82f410)
Reviewed: https:/ /review. openstack. org/266026 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=9246cffc7ca 8f6731c5448e63f 779b926f769e78
Committed: https:/
Submitter: Jenkins
Branch: stable/liberty
commit 9246cffc7ca8f67 31c5448e63f779b 926f769e78
Author: Swaminathan Vasudevan <email address hidden>
Date: Wed Nov 4 18:02:09 2015 -0800
Change check_ports_ exist_on_ l3agent to pass the subnet_ids
The get_subnet_ ids_on_ router is called for every exist_on_ l3agent.
available l3agent in check_ports_
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 ids_on_ router in agent_candidate s.
we would be only calling once get_subnet_
the get_l3_
This patch addresses the above problem by calling subnet_ ids_on_ router just once.
get_
Related-Bug: #1513678
Conflicts:
neutron/ tests/unit/ db/test_ agentschedulers _db.py
Change-Id: I9d130f98e07bfe 571eee32b827ff9 af4010ff0fb bd0c27e73fbe93d 739f82f410)
(cherry picked from commit 062ad0a0a62ab49