[ovn] Make scheduling of unhosted gateways aware of current transaction
At present, whenever multiple additions/updates are made to LRPs
with gateway_chassis, each update is put in separate transactions
in an attempt to ensure the scheduler operates on updated
information for each iteration.
This is problematic because we don't have the luxury of creating
separate transactions for updates in all parts of the code base,
and it is also not very efficient.
The OVSDBapp library wraps the OVS Python IDL and provides
different semantics. Most notably the OVSDBapp represents a
Transaction as a list of command objects with `run_idl` methods
for execution at some point in the future. The main loop and the
command objects are not aware of changes made in the current
transaction until it is committed.
Fortunately, as an ovsdbapp transaction is committed, the
underlying OVS Python IDL is kept up to date during the course of
the transaction [0][1][2].
Move implementation of scheduling of unhosted gateways into an
ovsdbapp command, using a plugin reference to the Neutron
OVNClient class for any calls into the Neutron code, allowing
scheduling decisions to be made on up to date data as the
transaction is applied.
Reviewed: https:/ /review. opendev. org/c/openstack /neutron/ +/874760 /opendev. org/openstack/ neutron/ commit/ 0bae4b70b6fc53c f5502622677a95e e50cc319a1
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 0bae4b70b6fc53c f5502622677a95e e50cc319a1
Author: Frode Nordahl <email address hidden>
Date: Wed Jun 21 08:59:24 2023 +0200
[ovn] Make scheduling of unhosted gateways aware of current transaction
At present, whenever multiple additions/updates are made to LRPs
with gateway_chassis, each update is put in separate transactions
in an attempt to ensure the scheduler operates on updated
information for each iteration.
This is problematic because we don't have the luxury of creating
separate transactions for updates in all parts of the code base,
and it is also not very efficient.
The OVSDBapp library wraps the OVS Python IDL and provides
different semantics. Most notably the OVSDBapp represents a
Transaction as a list of command objects with `run_idl` methods
for execution at some point in the future. The main loop and the
command objects are not aware of changes made in the current
transaction until it is committed.
Fortunately, as an ovsdbapp transaction is committed, the
underlying OVS Python IDL is kept up to date during the course of
the transaction [0][1][2].
Move implementation of scheduling of unhosted gateways into an
ovsdbapp command, using a plugin reference to the Neutron
OVNClient class for any calls into the Neutron code, allowing
scheduling decisions to be made on up to date data as the
transaction is applied.
0: https:/ /github. com/openvswitch /ovs/blob/ e3ba0be48ca4/ python/ ovs/db/ idl.py# L1316 /github. com/openvswitch /ovs/blob/ e3ba0be48ca4/ python/ ovs/db/ idl.py# L1400 /github. com/openvswitch /ovs/blob/ e3ba0be48ca4/ python/ ovs/db/ idl.py# L2083
1: https:/
2: https:/
Partial-Bug: #2002687 6b0617c43439643 e8443b2bdae
Co-Authored-By: Terry Wilson <email address hidden>
Co-Authored-By: Brian Haley <email address hidden>
Signed-off-by: Frode Nordahl <email address hidden>
Change-Id: I83bcf7fe838c0d