The FDP team is no longer accepting new bugs in Bugzilla. Please report your issues under FDP project in Jira. Thanks.
Bug 1928226 - ovn-nbctl fails to delete and add lr-nat in same transaction
Summary: ovn-nbctl fails to delete and add lr-nat in same transaction
Keywords:
Status: CLOSED DUPLICATE of bug 1942707
Alias: None
Product: Red Hat Enterprise Linux Fast Datapath
Classification: Red Hat
Component: OVN
Version: RHEL 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: OVN Team
QA Contact: Jianlin Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-12 16:49 UTC by Tim Rozet
Modified: 2021-05-04 14:24 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-04 14:24:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Tim Rozet 2021-02-12 16:49:24 UTC
Description of problem:
Executing a delete and add for lr-nat results in the following:


[root@ovn-control-plane ~]# ovn-nbctl lr-nat-list ovn_cluster_router
TYPE             EXTERNAL_IP        EXTERNAL_PORT    LOGICAL_IP            EXTERNAL_MAC         LOGICAL_PORT
dnat_and_snat    169.254.1.34                        10.244.1.2            ae:f9:70:78:2a:d6    k8s-ovn-control-plane
dnat_and_snat    169.254.2.242                       10.244.2.2            4e:ac:df:e2:48:2e    k8s-ovn-worker


[root@ovn-control-plane ~]# ovn-nbctl lr-nat-del ovn_cluster_router dnat_and_snat 169.254.1.34 -- --may-exist lr-nat-add  ovn_cluster_router dnat_and_snat 169.254.1.34 10.244.1.254 k8s-ovn-control-plane ae:f9:70:78:2a:d6
ovn-nbctl: a NAT with this type (dnat_and_snat) and external_ip (169.254.1.34) already exists

The result is nothing is deleted and re-added. Dumitru described the behavior as:
"So, the problem is like this: if you delete and --may-exist add the same object in the same transaction, the add doesn't happen at all, because the old nat object is still in IDL memory (orphaned) and will be removed when the txn is committed."

Request here is to fix ovn-nbctl to handle this scenario.

Comment 1 Dan Williams 2021-05-04 14:24:27 UTC

*** This bug has been marked as a duplicate of bug 1942707 ***


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