forked from openvswitch/ovs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ovn: Take advantage of OVSDB garbage collection in OVN_Northbound sch…
…ema. Until now, the OVN_Northbound schema has been designed to sidestep a weakness in the OVSDB protocol when a column has a great deal of data in it. In the current OVSDB protocol, whenever a column changes, the entire new value of the column is sent to all of the clients that are monitoring that column. That means that adding or removing a small amount of data, say 1 element in a set, requires sending all of the data, which is expensive if the column has a lot of data. One example of a column with potential to have a lot of data is the set of ports within a logical switch, if a logical switch has a large number of ports. Thus, the existing OVN_Northbound schema has each Logical_Port point to its containing Logical_Switch instead of the other way around. This sidesteps the problem because it does not use any large columns. The tradeoff that this forces, however, is that the schema cannot take advantage of OVSDB's garbage collection feature, where it automatically deletes rows that are unreferenced. That's a problem for Neutron because of Neutron-internal races between deletion of a Logical_Switch and creation of new Logical_Ports on the switch being deleted. When such a race happens, OVSDB refuses to delete the Logical_Switch because of references to it from the newly created Logical_Port (although Neutron does delete the pre-existing logical ports). To solve the problem, this commit changes the OVN_Northbound schema to use a set of ports within Logical_Switch. That will lead to large columns for large logical switches; I plan to address that (though I don't have code written) by enhancing the OVSDB protocol. With this commit applied, the database will automatically cascade deleting a logical switch row to delete all of its ports, ACLs, and its router port (if any). This commit makes some pretty pervasive changes to ovn-northd, but they are mostly beneficial to the code readability because now it becomes possible to trivially iterate through the ports that belong to a switch, which was difficult before the schema change. This commit will break the Neutron integration until that is changed to handle the new database schema. CC: Aaron Rosen <[email protected]> Signed-off-by: Ben Pfaff <[email protected]> Acked-by: Russell Bryant <[email protected]> Acked-by: Justin Pettit <[email protected]>
- Loading branch information
Showing
4 changed files
with
284 additions
and
265 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.