add/remove router interface uses multiple OVSDB transactions

Bug #1756388 reported by Lucas Alvares Gomes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-ovn
Fix Released
Medium
Lucas Alvares Gomes

Bug Description

When adding a router port in the L3 plugin we are using 2 separated OVSDB transaction one to create the lrouter port [0] or updated it [1] and another one for the NAT rules [2].

This can be problematic because if something fails in between these two operations the database can be in an inconsistent state.

The method remove_router_interface has the same problem.

We should refactor the code to combine these database changes into one transaction to avoid leaving the database in an inconsistent state.

[0] https://github.com/openstack/networking-ovn/blob/9e62f3dba50dd75edfa8faca5225781df1f2839e/networking_ovn/l3/l3_ovn.py#L178

[1] https://github.com/openstack/networking-ovn/blob/9e62f3dba50dd75edfa8faca5225781df1f2839e/networking_ovn/l3/l3_ovn.py#L174-L175

[2] https://github.com/openstack/networking-ovn/blob/9e62f3dba50dd75edfa8faca5225781df1f2839e/networking_ovn/l3/l3_ovn.py#L197-L198

Changed in networking-ovn:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Lucas Alvares Gomes (lucasagomes)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-ovn (master)

Fix proposed to branch: master
Review: https://review.openstack.org/553853

Changed in networking-ovn:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-ovn (master)

Reviewed: https://review.openstack.org/553853
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=378f4ec58e16a363aeabd16da1911775d0b36487
Submitter: Zuul
Branch: master

commit 378f4ec58e16a363aeabd16da1911775d0b36487
Author: Lucas Alvares Gomes <email address hidden>
Date: Fri Mar 16 16:01:01 2018 +0000

    Consolidate add/remove router interface OVS transactions

    This patch consolidades the database transactions for creating/deleting
    router ports on/from the OVN NB database. Having a single transaction is
    ideal to avoid inconsistencies that can be cause between two or more
    transactions.

    Closes-Bug: #1756388
    Change-Id: I0a0a5f6571ea695b91db89170be1fab258acd917

Changed in networking-ovn:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-ovn (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/592021

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-ovn (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/592025

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-ovn (stable/queens)

Reviewed: https://review.openstack.org/592025
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=be428b89809d3bb329ddda5cfd32f58c8f1d5193
Submitter: Zuul
Branch: stable/queens

commit be428b89809d3bb329ddda5cfd32f58c8f1d5193
Author: Lucas Alvares Gomes <email address hidden>
Date: Fri Mar 16 16:01:01 2018 +0000

    Consolidate add/remove router interface OVS transactions

    This patch consolidades the database transactions for creating/deleting
    router ports on/from the OVN NB database. Having a single transaction is
    ideal to avoid inconsistencies that can be cause between two or more
    transactions.

    Closes-Bug: #1756388
    Change-Id: I0a0a5f6571ea695b91db89170be1fab258acd917
    (cherry picked from commit 378f4ec58e16a363aeabd16da1911775d0b36487)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-ovn (stable/rocky)

Reviewed: https://review.openstack.org/592021
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=09eef8de9906ae9bfbd7a68818199693cf3d1b51
Submitter: Zuul
Branch: stable/rocky

commit 09eef8de9906ae9bfbd7a68818199693cf3d1b51
Author: Lucas Alvares Gomes <email address hidden>
Date: Fri Mar 16 16:01:01 2018 +0000

    Consolidate add/remove router interface OVS transactions

    This patch consolidades the database transactions for creating/deleting
    router ports on/from the OVN NB database. Having a single transaction is
    ideal to avoid inconsistencies that can be cause between two or more
    transactions.

    Closes-Bug: #1756388
    Change-Id: I0a0a5f6571ea695b91db89170be1fab258acd917
    (cherry picked from commit 378f4ec58e16a363aeabd16da1911775d0b36487)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/networking-ovn 4.0.3

This issue was fixed in the openstack/networking-ovn 4.0.3 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/networking-ovn 5.0.1

This issue was fixed in the openstack/networking-ovn 5.0.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/networking-ovn 6.0.0.0b1

This issue was fixed in the openstack/networking-ovn 6.0.0.0b1 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.