Comment 9 for bug 1914394

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/823628
Committed: https://opendev.org/openstack/neutron/commit/7699feb4a61661129c79bc7da517f07f1257124c
Submitter: "Zuul (22348)"
Branch: stable/ussuri

commit 7699feb4a61661129c79bc7da517f07f1257124c
Author: Lucas Alvares Gomes <email address hidden>
Date: Wed Feb 3 14:00:13 2021 +0000

    [OVN] Fix RowNotFound exception while waiting for metadata networks

    In the set_port_status_up() the OVN driver waits for the metadata to be
    provisioned (15 seconds) [0] prior to sending the event to Nova notifying
    that the provisioning of the port is done (network-vif-plugged). But
    there could be a race condition while trying to get that information
    which results in a RowNotFound being raise in the waiting loop.

    Once that happens, the exception is bubbled up and the OVN driver end up
    not sending the event to Nova and the instance will fail to deploy (it
    will be stuck in BUILD state until it times out).

    This patch changes the logic of the method looking for the metadata
    network information to not raise RowNotFound so that the waiting loop
    can iteract again [0] until the information is available.

    [0]
    https://github.com/openstack/neutron/blob/cbd72e2f4846ec64ff6e6ef24099a8e90ddebf31/neutron/plugins/ml2/drivers/ovn/mech_driver/mech_driver.py#L1124

    Change-Id: I3c106ace74b5c6e4ed0cb7e827baf5d6595ec5d0
    Closes-Bug: #1914394
    Signed-off-by: Lucas Alvares Gomes <email address hidden>
    (cherry picked from commit b618d98541599ad0ef73be41a3edd83d1fc75a56)
    (cherry picked from commit cbf3fe098bb44605174b8e582d56814fd36632c7)
    Conflicts cleanly resolved by removing not relevant code added before
    the addittion of the TestSBImplIdlOvn class. Also added missing
    ovsdbapp.backend import:
        neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/ovsdb/test_impl_idl_ovn.py