Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
The FDP team is no longer accepting new bugs in Bugzilla. Please report your issues under FDP project in Jira. Thanks.

Bug 2102930

Summary: fail to set gateway-chassis for lrp when set multiple gateway-chassis in one line
Product: Red Hat Enterprise Linux Fast Datapath Reporter: Jianlin Shi <jishi>
Component: ovn22.03Assignee: Ales Musil <amusil>
Status: CLOSED ERRATA QA Contact: Jianlin Shi <jishi>
Severity: medium Docs Contact:
Priority: medium    
Version: FDP 22.ECC: amusil, ctrautma, jiji
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovn22.03-22.03.0-65.el8fdp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-09-06 18:49:10 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 Jianlin Shi 2022-07-01 02:08:27 UTC
Description of problem:
fail to set gateway-chassis for lrp when set multiple gateway-chassis in one line

Version-Release number of selected component (if applicable):
ovn22.03-22.03.0-52.el8

How reproducible:
Always

Steps to Reproduce:
systemctl start ovn-northd                                                                            
ovn-nbctl lr-add ovn_cluster_router                         -- lrp-add ovn_cluster_router rtohv0 00:00:00:0f:00:01 10.244.1.1/24 fd00:10:244:1::1/64                        -- lrp-add ovn_cluster_router rtohv1 00:00:00:0f:01:01 10.244.2.1/24 fd00:10:244:2::1/64                        -- lrp-add ovn_cluster_router cluster_router_toj 00:00:00:0f:02:01 100.64.0.1/24 fd98::1/64                     -- lrp-set-gateway-chassis rtohv0 87abc8c1-613b-430b-89ee-0e52e1612ed1                  -- lrp-set-gateway-chassis rtohv1 953aba63-f012-4070-a54e-61fda17ddb2b

Actual results:
ovn-nbctl: --: priority must in range 0...32767 

Expected results:
pass

Additional info:


[root@wsfd-advnetlab17 ~]# rpm -qa | grep -E "openvswitch2.17|ovn22.03"                               
ovn22.03-host-22.03.0-52.el8fdp.x86_64                                                                
python3-openvswitch2.17-2.17.0-22.el8fdp.x86_64                                                       
ovn22.03-22.03.0-52.el8fdp.x86_64                                                                     
ovn22.03-central-22.03.0-52.el8fdp.x86_64                                                             
openvswitch2.17-2.17.0-22.el8fdp.x86_64

[root@wsfd-advnetlab17 ~]# bash -x test.sh 
+ systemctl start ovn-northd
+ ovn-nbctl lr-add ovn_cluster_router -- lrp-add ovn_cluster_router rtohv0 00:00:00:0f:00:01 10.244.1.1/24 fd00:10:244:1::1/64 -- lrp-add ovn_cluster_router rtohv1 00:00:00:0f:01:01 10.244.2.1/24 fd00:10:244:2::1/64 -- lrp-add ovn_cluster_router cluster_router_toj 00:00:00:0f:02:01 100.64.0.1/24 fd98::1/64 -- lrp-set-gateway-chassis rtohv0 87abc8c1-613b-430b-89ee-0e52e1612ed1 -- lrp-set-gateway-chassis rtohv1 953aba63-f012-4070-a54e-61fda17ddb2b                                                             
ovn-nbctl: --: priority must in range 0...32767

Comment 1 Ales Musil 2022-07-01 06:31:17 UTC
Hi, 
this does not seem to be a valid scenario. lrp-set-gateway-chassis acccepts only single chasssis with optional argument about priority:

lrp-set-gateway-chassis port chassis [priority]
    Set  gateway  chassis for port. chassis is the name of the chas‐
    sis. This creates a gateway chassis entry in Gateway_Chassis ta‐
    ble.  It  won’t check if chassis really exists in OVN_Southbound
    database. Priority will be set to 0 if priority is not  provided
    by user. priority must be between 0 and 32767, inclusive.

Comment 2 Jianlin Shi 2022-07-08 00:05:47 UTC
(In reply to Ales Musil from comment #1)
> Hi, 
> this does not seem to be a valid scenario. lrp-set-gateway-chassis acccepts
> only single chasssis with optional argument about priority:
> 
> lrp-set-gateway-chassis port chassis [priority]
>     Set  gateway  chassis for port. chassis is the name of the chas‐
>     sis. This creates a gateway chassis entry in Gateway_Chassis ta‐
>     ble.  It  won’t check if chassis really exists in OVN_Southbound
>     database. Priority will be set to 0 if priority is not  provided
>     by user. priority must be between 0 and 32767, inclusive.

Hi Ales,

exactly, I didn't set the priority in the command. the the command should not fail. and ovn-nbctl support multiple command in the same line, and it should not recognize the -- as priority.

Comment 3 Ales Musil 2022-07-08 07:15:18 UTC
Hi, 

for some reason I saw that the command was trying to set two chassis in single lrp-set-gateway-chassis, what you have described is a bug. 
I'll post a fix for that.

Comment 4 Jianlin Shi 2022-07-08 07:18:40 UTC
(In reply to Ales Musil from comment #3)
> Hi, 
> 
> for some reason I saw that the command was trying to set two chassis in
> single lrp-set-gateway-chassis, 

<=== no, I set gateway chassis for 2 ports, no the for same port: -- lrp-set-gateway-chassis rtohv0 87abc8c1-613b-430b-89ee-0e52e1612ed1                  -- lrp-set-gateway-chassis rtohv1 953aba63-f012-4070-a54e-61fda17ddb2b

what you have described is a bug. 
> I'll post a fix for that.

Comment 6 OVN Bot 2022-07-12 04:07:03 UTC
This issue is fixed in ovn22.03-22.03.0-65.el8fdp

Comment 7 OVN Bot 2022-07-12 04:07:10 UTC
This issue has been cloned at https://bugzilla.redhat.com/show_bug.cgi?id=2106207

Comment 8 OVN Bot 2022-07-12 04:07:18 UTC
This issue has been cloned at https://bugzilla.redhat.com/show_bug.cgi?id=2106208

Comment 9 OVN Bot 2022-07-12 04:07:25 UTC
This issue has been cloned at https://bugzilla.redhat.com/show_bug.cgi?id=2106209

Comment 13 Jianlin Shi 2022-08-02 06:15:15 UTC
Verified on ovn22.03-22.03.0-69:

[root@dell-per740-33 ~]# systemctl start ovn-northd                                                                            
[root@dell-per740-33 ~]# ovn-nbctl lr-add ovn_cluster_router                         -- lrp-add ovn_cluster_router rtohv0 00:00:00:0f:00:01 10.244.1.1/24 fd00:10:244:1::1/64                        -- lrp-add ovn_cluster_router rtohv1 00:00:00:0f:01:01 10.244.2.1/24 fd00:10:244:2::1/64                        -- lrp-add ovn_cluster_router cluster_router_toj 00:00:00:0f:02:01 100.64.0.1/24 fd98::1/64                     -- lrp-set-gateway-chassis rtohv0 87abc8c1-613b-430b-89ee-0e52e1612ed1                  -- lrp-set-gateway-chassis rtohv1 953aba63-f012-4070-a54e-61fda17ddb2b
[root@dell-per740-33 ~]# ovn-nbctl list logical_router_port rtohv0                                    
_uuid               : 0625521a-a4ab-4e40-a44e-444fb8ddc5d8                                            
enabled             : []                                                                              
external_ids        : {}                                                                              
gateway_chassis     : [8733a880-9be5-410f-b49a-1dd55d9c88d0]                                          
ha_chassis_group    : []                                                                              
ipv6_prefix         : []                                                                              
ipv6_ra_configs     : {}                                                                              
mac                 : "00:00:00:0f:00:01"                                                             
name                : rtohv0                                                                          
networks            : ["10.244.1.1/24", "fd00:10:244:1::1/64"]                                        
options             : {}                                                                              
peer                : []                                                                              
[root@dell-per740-33 ~]# rpm -qa | grep -E "openvswitch2.17|ovn22.03"                                 
python3-openvswitch2.17-2.17.0-37.el8fdp.x86_64                                                       
ovn22.03-central-22.03.0-69.el8fdp.x86_64                                                             
ovn22.03-host-22.03.0-69.el8fdp.x86_64                                                                
openvswitch2.17-2.17.0-37.el8fdp.x86_64                                                               
ovn22.03-22.03.0-69.el8fdp.x86_64

Comment 15 errata-xmlrpc 2022-09-06 18:49:10 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 (ovn22.03 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-2022:6360