Inefficient code when updating router interface

Bug #1645712 reported by Shachar Snapiri
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DragonFlow
New
Low
rajiv

Bug Description

In l3_proactive_app.py, _update_router_interfaces

When an interface is modified, the code will treat it as-if it was removed and another one added.
In the current implementation, we add the new interface (thus adding all the OVS flows), and only then remove the old one.
This has multiple issues:
1. Depending on the interface changes the adding of the flows may fail (old-new interfaces too similar)
2. The flows that are added to the old interface will be removed when it will be deleted, thus we have a lot of redundant work for nothing.

Changing the order (delete first and then add) will solve the second, but will have a split moment when required flows are missing.

The best solution would be to identify the interfaces modified using their IDs and modify the flows instead of adding and deleting.
Adding/deleting flows should be only for added/removed ports, and anyway I believe that deleting should be done before adding...

rajiv (rajiv-kumar)
Changed in dragonflow:
assignee: nobody → rajiv (rajiv-kumar)
Li Ma (nick-ma-z)
Changed in dragonflow:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to dragonflow (master)

Reviewed: https://review.openstack.org/465435
Committed: https://git.openstack.org/cgit/openstack/dragonflow/commit/?id=6a5ac78eb460968120fca642cd4f512942271573
Submitter: Jenkins
Branch: master

commit 6a5ac78eb460968120fca642cd4f512942271573
Author: Li Ma <email address hidden>
Date: Wed May 17 15:25:09 2017 +0800

    Change the logic of updating routers

    We first remove the ports and then add the ports.
    This can improve the stability of update operation
    and eliminate redundant work on flows.

    The best solution is to introduce diff operation to
    identify the minimal operations of removing/adding
    flows. It is out of scope of this commit.
    And I also think it should be a blueprint.

    Change-Id: Id40b73192f57a5b09c0938fd3d3d51a9cebe3b54
    Partial-Bug: #1645712

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.