Function sync_routers always call _get_dvr_sync_data in ha scenario

Bug #1510796 reported by Lan Qi song on 2015-10-28
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Low
ZongKai LI

Bug Description

The configuration
neutron.conf:
[DEFAULT]
....
l3_ha = True
service_plugins = router
....

l3_agent.ini:

[DEFAULT]
...
agent_mode = legacy
...

The current code call the "get_dvr_sync_data" through the plugin support dvr or not , it's better to judge "agent mode" here:
https://github.com/openstack/neutron/blob/master/neutron/db/l3_hamode_db.py#L535-L536

Call "get_sync_data" method here can save more time.

ZongKai LI (zongkai) on 2015-10-28
Changed in neutron:
assignee: nobody → ZongKai LI (lzklibj)
ZongKai LI (zongkai) on 2015-10-28
summary: - Function sync_routers always call "get_dvr_sync_data" in ha but not dvr
- scenario
+ Function sync_routers always call "get_dvr_sync_data" in ha scenario

Fix proposed to branch: master
Review: https://review.openstack.org/239908

Changed in neutron:
status: New → In Progress
ZongKai LI (zongkai) on 2015-10-28
summary: - Function sync_routers always call "get_dvr_sync_data" in ha scenario
+ Function sync_routers always call _get_dvr_sync_data in ha scenario
Ryan Moats (rmoats) on 2015-10-29
tags: added: l3-dvr-backlog l3-ha
Ryan Moats (rmoats) on 2015-11-10
Changed in neutron:
importance: Undecided → Low

Reviewed: https://review.openstack.org/239908
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=294324d6970980e8f95f441727204c66478b4684
Submitter: Jenkins
Branch: master

commit 294324d6970980e8f95f441727204c66478b4684
Author: lzklibj <email address hidden>
Date: Wed Oct 28 17:02:11 2015 +0800

    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

Changed in neutron:
status: In Progress → Fix Released

This issue was fixed in the openstack/neutron 8.0.0.0b2 development milestone.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers