Bug 1669306 - Add ability to run read-only Commands outside a transaction
Summary: Add ability to run read-only Commands outside a transaction
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-ovsdbapp
Version: 14.0 (Rocky)
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: z2
: 14.0 (Rocky)
Assignee: Terry Wilson
QA Contact: Roman Safronov
URL:
Whiteboard:
: 1668746 (view as bug list)
Depends On:
Blocks: 1649334 1674560 1705056 1714911
TreeView+ depends on / blocked
 
Reported: 2019-01-24 21:56 UTC by Terry Wilson
Modified: 2019-07-26 15:02 UTC (History)
8 users (show)

Fixed In Version: python-ovsdbapp-0.12.3-1.el7ost
Doc Type: Bug Fix
Doc Text:
This update fixes a networking-ovn bug that prevented load balancer traffic from being distributed even when distributed virtual routing (DVR) was enabled. Prior to this update, auto-nested transactions failed when the return value of one command was used as input to another. Commands that returned values used in other commands that were bundled into the same auto-nested transaction could not return their values until after the transaction completed. This caused the networking-ovn load balancer problem. Because most commands that return values are read-only, it is not necessary to initiate a transaction, because the data is already in memory. With this update, the read-only commands are run outside of a transaction, resolving the problem.
Clone Of:
: 1674560 1714911 (view as bug list)
Environment:
Last Closed: 2019-05-29 15:58:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1813213 0 None None None 2019-01-24 21:56:34 UTC
OpenStack gerrit 633070 0 'None' MERGED Allow read-only Commands to bypass txns in execute() 2020-04-30 09:10:05 UTC
Red Hat Product Errata RHBA-2019:0944 0 None None None 2019-04-30 17:47:49 UTC

Description Terry Wilson 2019-01-24 21:56:35 UTC
networking-ovn uses nested transactions, and some of the code for DVR relies on the result of a call to lsp_get_up.execute() inside a nested transaction. The result doesn't get set until the parent transaction is complete, so execute() returns None which prevents the external_mac from being set, so traffic ends up being sent to the controller instead of the through the compute node.

Although this isn't technically a bug in ovsdbapp, the behavior is not documented at all and is surprising. Luckily, it is very easy to safely work around in ovsdbapp and should lead to increased performance as well. All that needs to be done is to allow Command.execute() to run read-only Commands outside of a transaction. This is safe because execute() is designed for single-command transactions and read-only Commands only access the in-memory copy of the database.

Comment 5 Terry Wilson 2019-02-21 14:28:38 UTC
ovsbapp rocky release 0.12.3 contains these changes.

Comment 16 Roman Safronov 2019-04-16 12:57:37 UTC
Verified on 14.0-RHEL-7/2019-04-12.1  with  python2-ovsdbapp-0.12.3-1.el7ost.noarch

Verified that DVR functionality works properly.
Scenario:
Created a router, connected it to the external network.
Created internal network, subnet, connected network to the router.
Created a security group with icp/ssh allowed.
Created a VM with the security rules applied, connected to the internal network.
Created a floating IP for the VM.
Verified that traffic from the VM goes out via compute node.
Also verified that when VM does not have a FIP traffic from it goes out via controller node which is master chassis for the router.

Comment 17 Roman Safronov 2019-04-30 08:49:26 UTC
*** Bug 1668746 has been marked as a duplicate of this bug. ***

Comment 19 errata-xmlrpc 2019-04-30 17:47:41 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:0944


Note You need to log in before you can comment on or make changes to this bug.