Bug 1563213

Summary: Add / Remove router interface uses multiple OVSDB transactions
Product: Red Hat OpenStack Reporter: Lucas Alvares Gomes <lmartins>
Component: python-networking-ovnAssignee: Lucas Alvares Gomes <lmartins>
Status: CLOSED ERRATA QA Contact: Eran Kuris <ekuris>
Severity: medium Docs Contact:
Priority: medium    
Version: 13.0 (Queens)CC: apevec, lhh, majopela, rheslop, slinaber
Target Milestone: ---Keywords: Triaged, ZStream
Target Release: 14.0 (Rocky)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-networking-ovn-5.0.2-0.20190307204430.6a774a0.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-04-30 17:51:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lucas Alvares Gomes 2018-04-03 12:18:14 UTC
Description of problem:

Reporting from upstream (Bug #1756388) 

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

Version-Release number of selected component (if applicable):

13.0 (Queens release)

Workaround:

One could run the "neutron-ovn-db-sync-util" script manually and get the database fixed if it gets inconsistent.

Comment 10 errata-xmlrpc 2019-04-30 17:51:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:0950