Comment 38 for bug 2002687

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/874760
Committed: https://opendev.org/openstack/neutron/commit/0bae4b70b6fc53cf5502622677a95ee50cc319a1
Submitter: "Zuul (22348)"
Branch: master

commit 0bae4b70b6fc53cf5502622677a95ee50cc319a1
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
    1: https://github.com/openvswitch/ovs/blob/e3ba0be48ca4/python/ovs/db/idl.py#L1400
    2: https://github.com/openvswitch/ovs/blob/e3ba0be48ca4/python/ovs/db/idl.py#L2083

    Partial-Bug: #2002687
    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: I83bcf7fe838c0d6b0617c43439643e8443b2bdae