Bug 2162817 - OVN is not respecting the ct zone request from ovnk
Summary: OVN is not respecting the ct zone request from ovnk
Keywords:
Status: VERIFIED
Alias: None
Product: Red Hat Enterprise Linux Fast Datapath
Classification: Red Hat
Component: ovn22.12
Version: FDP 22.L
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
: ---
Assignee: Mark Michelson
QA Contact: Jianlin Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-01-21 05:06 UTC by OVN Bot
Modified: 2023-02-14 02:19 UTC (History)
4 users (show)

Fixed In Version: ovn22.12-22.12.0-16.el9fdp
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FD-2640 0 None None None 2023-01-21 05:08:39 UTC

Description OVN Bot 2023-01-21 05:06:10 UTC
This is an automatically-generated clone of issue https://bugzilla.redhat.com/show_bug.cgi?id=2160403

Comment 3 Jianlin Shi 2023-02-14 02:19:39 UTC
reproducer:

systemctl start openvswitch                                                                           

systemctl start ovn-northd                                                                            
ovn-nbctl set-connection ptcp:6641                                                                    
ovn-sbctl set-connection ptcp:6642                                                                    
ovs-vsctl set open . external_ids:system-id=hv1 external_ids:ovn-remote=tcp:127.0.0.1:6642 external_ids:ovn-encap-type=geneve external_ids:ovn-encap-ip=127.0.0.1
systemctl restart ovn-controller                                                                      

ovn-nbctl --wait=hv sync                                                                              
sleep 2
ovn-sbctl list datapath_binding                                                                       

ovn-nbctl lr-add lr0 -- set Logical_Router lr0 options:snat-ct-zone=666 -- lrp-add lr0 lrp-gw 01:00:00:00:00:01 172.16.0.1 -- lrp-set-gateway-chassis lrp-gw hv1
                                                                                                      
ovn-nbctl --wait=hv sync                                                                              
sleep 2                                                                                               
                                                                                                      
lr_uuid=$(ovn-sbctl find datapath_bind external_ids:name=lr0 | awk '/_uuid/{print $3}')               
ct_zones=$(ovn-appctl -t ovn-controller ct-zone-list)                                                 
zone_num=$(printf "$ct_zones" | grep ${lr_uuid}_snat | cut -d ' ' -f 2)                               
                                                                                                      
test "$zone_num" -eq 666                                                                              
echo $?

reproduced on ovn22.12-22.12.0-4.el9:

[root@kvm-02-guest04 bz2160403]# rpm -qa | grep -E "ovn22.12|openvswitch3.0"                          
ovn22.12-22.12.0-4.el9fdp.x86_64
openvswitch3.0-3.0.0-30.el9fdp.x86_64                                                                 
ovn22.12-central-22.12.0-4.el9fdp.x86_64
ovn22.12-host-22.12.0-4.el9fdp.x86_64 

+ ovn-nbctl --wait=hv sync                                                                            
+ sleep 2
++ awk '/_uuid/{print $3}'
++ ovn-sbctl find datapath_bind external_ids:name=lr0                                                 
+ lr_uuid=dac1a326-5f9a-4611-bde5-f2507584c4e0
++ ovn-appctl -t ovn-controller ct-zone-list                                                          
+ ct_zones='dac1a326-5f9a-4611-bde5-f2507584c4e0_snat 1                                               
dac1a326-5f9a-4611-bde5-f2507584c4e0_dnat 2'
++ cut -d ' ' -f 2
++ grep dac1a326-5f9a-4611-bde5-f2507584c4e0_snat                                                     
++ printf 'dac1a326-5f9a-4611-bde5-f2507584c4e0_snat 1                                                
dac1a326-5f9a-4611-bde5-f2507584c4e0_dnat 2'                                                          
+ zone_num=1                                                                                          
+ test 1 -eq 666                                                                                      
+ echo 1
1

Verified on ovn22.12-22.12.0-20.el9:

[root@kvm-02-guest04 bz2160403]# rpm -qa | grep -E "ovn22.12|openvswitch3.0"
openvswitch3.0-3.0.0-30.el9fdp.x86_64
ovn22.12-22.12.0-20.el9fdp.x86_64
ovn22.12-central-22.12.0-20.el9fdp.x86_64
ovn22.12-host-22.12.0-20.el9fdp.x86_64

+ ovn-nbctl --wait=hv sync
+ sleep 2
++ awk '/_uuid/{print $3}'
++ ovn-sbctl find datapath_bind external_ids:name=lr0
+ lr_uuid=680c6f10-020c-4f93-9837-53f6e7db4e44
++ ovn-appctl -t ovn-controller ct-zone-list
+ ct_zones='680c6f10-020c-4f93-9837-53f6e7db4e44_snat 666
680c6f10-020c-4f93-9837-53f6e7db4e44_dnat 1'
++ cut -d ' ' -f 2
++ grep 680c6f10-020c-4f93-9837-53f6e7db4e44_snat
++ printf '680c6f10-020c-4f93-9837-53f6e7db4e44_snat 666
680c6f10-020c-4f93-9837-53f6e7db4e44_dnat 1'
+ zone_num=666
+ test 666 -eq 666
+ echo 0
0


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