Bug 1959909

Summary: --may-exist does not work on ECMP routes
Product: Red Hat Enterprise Linux Fast Datapath Reporter: Tim Rozet <trozet>
Component: OVNAssignee: lorenzo bianconi <lorenzo.bianconi>
Status: CLOSED ERRATA QA Contact: Jianlin Shi <jishi>
Severity: unspecified Docs Contact:
Priority: medium    
Version: RHEL 8.0CC: akaris, ctrautma, dcbw, jiji, mapandey
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovn2.13-20.12.0-121.el8fdp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-21 14:44:39 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:
Bug Depends On:    
Bug Blocks: 1959906, 1984978    

Description Tim Rozet 2021-05-12 15:30:12 UTC
Description of problem:
executing:
+ ovn-nbctl --timeout=15 -- --may-exist --policy=src-ip --ecmp-symmetric-reply lr-route-add lr1 10.244.0.7/32 172.18.0.4
+ ovn-nbctl --timeout=15 -- --may-exist --policy=src-ip --ecmp-symmetric-reply lr-route-add lr1 10.244.0.7/32 172.18.0.4
ovn-nbctl: duplicate nexthop for the same ECMP route

results in an error. This should not happen because may-exist was used and the route already existed. See:

https://bugzilla.redhat.com/show_bug.cgi?id=1916842#c1

Comment 4 Jianlin Shi 2021-06-07 01:49:10 UTC
Verified on ovn2.13-20.12.0-135.el7 with https://bugzilla.redhat.com/show_bug.cgi?id=1916842#c1:

+ ovn-nbctl --timeout=15 -- --may-exist --policy=src-ip --ecmp-symmetric-reply lr-route-add lr1 10.244.0.7/32 172.18.0.4
+ ovn-nbctl --timeout=15 -- --may-exist --policy=src-ip --ecmp-symmetric-reply lr-route-add lr1 10.244.0.7/32 172.18.0.4
+ ovn-nbctl --timeout=15 -- --may-exist --policy=src-ip lr-route-add lr1 10.1.0.7/32 172.18.0.4       
+ ovn-nbctl --timeout=15 -- --may-exist --policy=src-ip lr-route-add lr1 10.1.0.7/32 172.18.0.4       
+ ovn-nbctl lr-route-list lr1                                                                         
IPv4 Routes                                                                                           
                 10.1.0.7                172.18.0.4 src-ip                                            
               10.244.0.7                172.18.0.4 src-ip ecmp-symmetric-reply                       
[root@dell-per740-12 bz1959909]# rpm -qa | grep -E "openvswitch2.13|ovn2.13"                          
openvswitch2.13-2.13.0-96.el7fdp.x86_64                                                               
ovn2.13-20.12.0-135.el7fdp.x86_64                                                                     
ovn2.13-central-20.12.0-135.el7fdp.x86_64                                                             
ovn2.13-host-20.12.0-135.el7fdp.x86_64

also Verified on ovn2.13-20.12.0-135.el8:

+ ovn-nbctl --timeout=15 -- --may-exist --policy=src-ip --ecmp-symmetric-reply lr-route-add lr1 10.244.0.7/32 172.18.0.4
+ ovn-nbctl --timeout=15 -- --may-exist --policy=src-ip --ecmp-symmetric-reply lr-route-add lr1 10.244.0.7/32 172.18.0.4
+ ovn-nbctl --timeout=15 -- --may-exist --policy=src-ip lr-route-add lr1 10.1.0.7/32 172.18.0.4       
+ ovn-nbctl --timeout=15 -- --may-exist --policy=src-ip lr-route-add lr1 10.1.0.7/32 172.18.0.4       
+ ovn-nbctl lr-route-list lr1                                                                         
IPv4 Routes                                                                                           
                 10.1.0.7                172.18.0.4 src-ip                                            
               10.244.0.7                172.18.0.4 src-ip ecmp-symmetric-reply                       
[root@dell-per730-03 bz1959909]# rpm -qa | grep -E "openvswitch2.15|ovn2.13"
openvswitch2.15-2.15.0-23.el8fdp.x86_64                                                               
ovn2.13-20.12.0-135.el8fdp.x86_64                                                                     
ovn2.13-host-20.12.0-135.el8fdp.x86_64                                                                
ovn2.13-central-20.12.0-135.el8fdp.x86_64 

also verified on ovn-2021-21.03.0-40.el8:

[root@dell-per730-03 bz1959909]# rpm -qa | grep -E  "openvswitch2.15|ovn-2021"
openvswitch2.15-2.15.0-23.el8fdp.x86_64
ovn-2021-21.03.0-40.el8fdp.x86_64
ovn-2021-central-21.03.0-40.el8fdp.x86_64
ovn-2021-host-21.03.0-40.el8fdp.x86_64

+ ovn-nbctl --timeout=15 -- --may-exist --policy=src-ip --ecmp-symmetric-reply lr-route-add lr1 10.244.0.7/32 172.18.0.4
+ ovn-nbctl --timeout=15 -- --may-exist --policy=src-ip --ecmp-symmetric-reply lr-route-add lr1 10.244.0.7/32 172.18.0.4
+ ovn-nbctl --timeout=15 -- --may-exist --policy=src-ip lr-route-add lr1 10.1.0.7/32 172.18.0.4
+ ovn-nbctl --timeout=15 -- --may-exist --policy=src-ip lr-route-add lr1 10.1.0.7/32 172.18.0.4
+ ovn-nbctl lr-route-list lr1
IPv4 Routes
                 10.1.0.7                172.18.0.4 src-ip
               10.244.0.7                172.18.0.4 src-ip ecmp-symmetric-reply

Comment 5 Mohamed Mahmoud 2021-06-09 15:39:45 UTC
*** Bug 1968151 has been marked as a duplicate of this bug. ***

Comment 7 errata-xmlrpc 2021-06-21 14:44:39 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 (ovn2.13 bug fix and enhancement 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/RHBA-2021:2507