The FDP team is no longer accepting new bugs in Bugzilla. Please report your issues under FDP project in Jira. Thanks.
Bug 1956377 - The OVS Python IDL calls notify() before all rows in a tx
Summary: The OVS Python IDL calls notify() before all rows in a tx
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Linux Fast Datapath
Classification: Red Hat
Component: openvswitch2.13
Version: FDP 21.C
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Open vSwitch development team
QA Contact: qding
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-03 14:54 UTC by Terry Wilson
Modified: 2021-05-07 09:16 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-07 09:16:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Terry Wilson 2021-05-03 14:54:07 UTC
Description of problem:

When multi-row transaction updates are parsed by the Python IDL, notify() is called on each Row as it is processed. When a row references another row that is created in the same transact, e.g. Logical_Router_Port.gateway_chassis and a new Gateway_Chassis, the notify() on the parent Row can be called before the child row has been processed, notify passes the parent row with the reference column empty. With Python 2.7, which does not maintain dict insertion order, this will always happen with a Logical_Router_Port and Gateway_Chassis because of the hash of those string keys always putting the LRP first. With Python 3, this issue doesn't present but it still leaves things open for race conditions.

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


How reproducible:
100% on Python 2.7

Steps to Reproduce:
1. Create an Idl subclass that defines notify()
2. Create a txn creating a Logical_Router_Port and a Gateway_Chassis, setting the LRP.gateway_chassis to the new GC
3. Commit the txn and see that the LRP passed to notify() has an empty gateway_chassis field.

Actual results:
LRP.gateway_chassis is empty

Expected results:
LRP.gateway_chassis contains the reference to the new GWC


Additional info:
This is fixed upstream 2.13 in fc8444fb1d7e113bd6f9954471f80f36e93f2fe7 "python: Send notifications after the transaction ends." and just needs a downstream backport.

Comment 1 Ilya Maximets 2021-05-03 15:50:57 UTC
Hi. Commit fc8444fb1d7e113bd6f9954471f80f36e93f2fe7 is already part of the
2.13.0-102 build for rhel8 and 2.13.0-85 for rhel7.

Comment 2 Timothy Redaelli 2021-05-07 09:16:51 UTC
It's part of FDP 20.C for RHEL7 and it'll be part of FDP 20.D for RHEL8


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