Bug 1986443

Summary: OVN-kube master may report errors for "transaction failed" when creating logical ports
Product: OpenShift Container Platform Reporter: Tim Rozet <trozet>
Component: NetworkingAssignee: Tim Rozet <trozet>
Networking sub component: ovn-kubernetes QA Contact: Anurag saxena <anusaxen>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: huirwang, tidawson
Version: 4.9   
Target Milestone: ---   
Target Release: 4.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-18 17:42:18 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 Tim Rozet 2021-07-27 14:42:45 UTC
Description of problem:
Due to recent changes where node handler may also handle adding back pods, there can be a simultaneous add of the same pod, resulting in an error like:

0723 03:34:51.835876       1 ovn.go:502] error while creating logical port openshift-network-diagnostics_network-check-target-fh8bq error: Transaction Failed due to an error: constraint violation details: Transaction causes multiple rows in "Logical_Switch_Port" table to have identical values (openshift-network-diagnostics_network-check-target-fh8bq) for index on column "name".  First row, with UUID eed1ddd5-baaa-4d27-a89c-d0755d18d15e, existed in the database before this transaction, which modified some of the row's columns but not any columns in this index.  Second row, with UUID ab893aae-4dea-4a29-a6b8-513f93b7bfc7, was inserted by this transaction. in committing transaction

To reproduce it, simply restart the active ovnkube-master (ensure it becomes active again). The node handler will try to add back the pods at the same time the pod handler does, leading to the above error.

Comment 5 errata-xmlrpc 2021-10-18 17:42:18 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 (Moderate: OpenShift Container Platform 4.9.0 bug fix and security update), 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/RHSA-2021:3759

Comment 7 Red Hat Bugzilla 2023-09-15 01:12:07 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days