Inefficient code when updating router interface
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
DragonFlow |
New
|
Low
|
rajiv |
Bug Description
In l3_proactive_
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...
Changed in dragonflow: | |
assignee: | nobody → rajiv (rajiv-kumar) |
Changed in dragonflow: | |
importance: | Undecided → Low |
Reviewed: https:/ /review. openstack. org/465435 /git.openstack. org/cgit/ openstack/ dragonflow/ commit/ ?id=6a5ac78eb46 0968120fca642cd 4f512942271573
Committed: https:/
Submitter: Jenkins
Branch: master
commit 6a5ac78eb460968 120fca642cd4f51 2942271573
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: Id40b73192f57a5 b09c0938fd3d3d5 1a9cebe3b54
Partial-Bug: #1645712