]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
fix get_ha_sync_data_for_host for non-dvr agent
authorlzklibj <lzklibj@cn.ibm.com>
Wed, 28 Oct 2015 09:02:11 +0000 (17:02 +0800)
committerlzklibj <lzklibj@cn.ibm.com>
Fri, 15 Jan 2016 08:47:57 +0000 (16:47 +0800)
commit294324d6970980e8f95f441727204c66478b4684
tree022d49393d6600ecebf7064a3f2cdb08f946d80b
parent2c599814fbf7f13504218000c07de81eb6f25f5a
fix get_ha_sync_data_for_host for non-dvr agent

get_ha_sync_data_for_host will call _get_dvr_sync_data
even given agent is not in DVR agent_mode.
_get_dvr_sync_data has additional processing for dvr
like:
    dvr_router_ids = set(router['id'] for router in routers
                         if is_distributed_router(router))
    floating_ip_port_ids = [fip['port_id'] for fip in floating_ips
                                if fip['router_id'] in dvr_router_ids]
which should only work for DVR scenario.

That will increase neutron-server processing time for
non-DVR scenario. Adding logic to judge whether given
agent is in DVR agent_mode, call get_sync_data directly.

Closes-Bug: #1510796
Change-Id: I5572e19b7cd8b2ea63fde4463705ab1c56fe5e68
neutron/db/l3_agentschedulers_db.py
neutron/db/l3_dvrscheduler_db.py
neutron/db/l3_hamode_db.py
neutron/tests/unit/db/test_l3_hamode_db.py
neutron/tests/unit/scheduler/test_l3_agent_scheduler.py