The FDP team is no longer accepting new bugs in Bugzilla. Please report your issues under FDP project in Jira. Thanks.
Bug 1878943 - [OVN 2.13]qos doesn't work on localnet sometimes
Summary: [OVN 2.13]qos doesn't work on localnet sometimes
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Fast Datapath
Classification: Red Hat
Component: ovn2.13
Version: FDP 20.E
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: lorenzo bianconi
QA Contact: ying xu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-15 02:25 UTC by ying xu
Modified: 2023-09-14 06:08 UTC (History)
4 users (show)

Fixed In Version: ovn2.13-20.06.2-15.el7fdn
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 09:49:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:4356 0 None None None 2020-10-27 09:49:35 UTC

Description ying xu 2020-09-15 02:25:51 UTC
Description of problem:
qos doesn't work on localnet sometimes

Version-Release number of selected component (if applicable):
since the first version of 20.06.1:ovn2.13-20.06.1-0.el7fdn

the last working version is  ovn2.13-2.13.0-39.el7fdp

How reproducible:
always

Steps to Reproduce:
we can use the case:/networking/openvswitch/ovn/qos

# r1
                ovn-nbctl lr-add r1
                ovn-nbctl lrp-add r1 r1_s2 00:de:ad:ff:01:02 172.16.102.1/24
                ovn-nbctl lrp-add r1 r1_s3 00:de:ad:ff:01:03 172.16.103.1/24

                # s2
                ovn-nbctl ls-add s2

                # s2 - r1
                ovn-nbctl lsp-add s2 s2_r1
                ovn-nbctl lsp-set-type s2_r1 router
                #ovn-nbctl lsp-set-addresses s2_r1 00:de:ad:ff:01:02
                ovn-nbctl lsp-set-addresses s2_r1 "00:de:ad:ff:01:02 172.16.102.1"
                ovn-nbctl lsp-set-options s2_r1 router-port=r1_s2

                # s2 - hv1_vm00_vnet1
                ovn-nbctl lsp-add s2 hv1_vm00_vnet1
                ovn-nbctl lsp-set-addresses hv1_vm00_vnet1 "00:de:ad:01:00:01 172.16.102.11"
                ovn-nbctl lsp-set-dhcpv4-options hv1_vm00_vnet1 $dhcp_102

                # s2 - hv1_vm01_vnet1
                ovn-nbctl lsp-add s2 hv1_vm01_vnet1
                ovn-nbctl lsp-set-addresses hv1_vm01_vnet1 "00:de:ad:01:01:01 172.16.102.12"
                ovn-nbctl lsp-set-dhcpv4-options hv1_vm01_vnet1 $dhcp_102

                # s3
                ovn-nbctl ls-add s3

                # s3 - r1
                ovn-nbctl lsp-add s3 s3_r1
                ovn-nbctl lsp-set-type s3_r1 router
                #ovn-nbctl lsp-set-addresses s3_r1 00:de:ad:ff:01:03
                ovn-nbctl lsp-set-addresses s3_r1 "00:de:ad:ff:01:03 172.16.103.1"
ovn-nbctl lsp-set-options s3_r1 router-port=r1_s3

                # s3 - hv0_vm00_vnet1
                ovn-nbctl lsp-add s3 hv0_vm00_vnet1
                ovn-nbctl lsp-set-addresses hv0_vm00_vnet1 "00:de:ad:00:00:01 172.16.103.11"
                ovn-nbctl lsp-set-dhcpv4-options hv0_vm00_vnet1 $dhcp_103

                # s3 - hv0_vm01_vnet1
                ovn-nbctl lsp-add s3 hv0_vm01_vnet1
                ovn-nbctl lsp-set-addresses hv0_vm01_vnet1 "00:de:ad:00:01:01 172.16.103.12"
                ovn-nbctl lsp-set-dhcpv4-options hv0_vm01_vnet1 $dhcp_103

                ovn-nbctl set Logical_Router_Port r1_s2 options:redirect-chassis=hv1

#set external floating ip
                ovs-vsctl add-br nat_test
                ip link set nat_test up
                ovs-vsctl set Open_vSwitch . external-ids:ovn-bridge-mappings=nattest:nat_test
                ovs-vsctl add-port nat_test $nic_test2
                ip link set $nic_test2 up

                ovn-nbctl ls-add public
                ovn-nbctl lsp-add public ln_p1
                ovn-nbctl lsp-set-addresses ln_p1 unknown
                ovn-nbctl lsp-set-type ln_p1 localnet
                ovn-nbctl lsp-set-options ln_p1 network_name=nattest

                ovn-nbctl lrp-add r1 r1_public 40:44:00:00:00:03 172.16.104.1/24
                ovn-nbctl lsp-add public public_r1
                ovn-nbctl lsp-set-type public_r1 router
                ovn-nbctl lsp-set-addresses public_r1 router
                ovn-nbctl lsp-set-options public_r1 router-port=r1_public nat-addresses=router
                ovn-nbctl remove Logical_Router_Port r1_s2 options redirect-chassis
                ovn-nbctl set Logical_Router_Port r1_public options:redirect-chassis=hv1
                ovn-nbctl get Logical_Router_Port r1_public options:redirect-chassis

                ovs-vsctl add-br nat_test
                ip link set nat_test up
                ovs-vsctl set Open_vSwitch . external-ids:ovn-bridge-mappings=nattest:nat_test
                ovs-vsctl add-port nat_test $nic_test2
                ip link set $nic_test2 up

                ovn-nbctl show
                ovs-vsctl show

                ovn-nbctl lr-nat-add r1 dnat_and_snat 172.16.104.200 172.16.102.11 hv1_vm00_vnet1 00:00:00:01:02:03
                ovn-nbctl lr-nat-add r1 dnat_and_snat 172.16.104.201 172.16.103.11 hv0_vm00_vnet1 00:00:00:04:05:06
                ovn-nbctl lr-nat-list r1
ovn-nbctl set Logical_Switch_Port ln_p1 options:qos_max_rate=2000000
                ovn-nbctl set Logical_Switch_Port ln_p1 options:qos_burst=2200000
                ovs-vsctl set interface $nic_test2 external-ids:ovn-egress-iface=true
                ovs-vsctl show

run on vm1 'netperf -H 172.16.104.201 > log.txt'
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 1.1.1.1 (1.1.1.1) port 0 AF_INET
Recv   Send    Send                          
Socket Socket  Message  Elapsed              
Size   Size    Size     Time     Throughput  
bytes  bytes   bytes    secs.    10^6bits/sec  

 87380  16384  16384    10.00    8725.53   ------------qos doesn't work  

 
then,config qos again,
 ovn-nbctl set Logical_Switch_Port ln_p1 options:qos_max_rate=200000000
                ovn-nbctl set Logical_Switch_Port ln_p1 options:qos_burst=220000000

run on vm1 'netperf -H 172.16.104.201 > log.txt'
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 1.1.1.1 (1.1.1.1) port 0 AF_INET
Recv   Send    Send                          
Socket Socket  Message  Elapsed              
Size   Size    Size     Time     Throughput  
bytes  bytes   bytes    secs.    10^6bits/sec  

 87380  16384  16384    10.00    212.45        --------------works! 


Actual results:
the qos on localnet doesn't work first time,but works after another config.

Expected results:
qos works every time.

Additional info:

Comment 1 ying xu 2020-09-16 08:56:04 UTC
this issue is due to that set the ""ovs-vsctl set interface $nic_test2 external-ids:ovn-egress-iface=true after qos.

If set this first ,it works!

Comment 4 ying xu 2020-10-10 09:30:57 UTC
I use the script in the bug description, but, it doesn't work sometimes.

and I test more, I found the issue in this bug is fixed.

when I set the "ovs-vsctl set interface $nic_test2 external-ids:ovn-egress-iface=true" before qos or after qos,

and set the qos limit less than 100, they all work!

but if the qos limit greater than 100, the traffic also shape below 100.

# ovn-nbctl list logical_switch_port
_uuid               : c075574a-6c4e-42a5-a7ae-7310e177acb4
addresses           : [unknown]
dhcpv4_options      : []
dhcpv6_options      : []
dynamic_addresses   : []
enabled             : []
external_ids        : {}
ha_chassis_group    : []
name                : ln_p1
options             : {network_name=nattest, qos_burst="22000000", qos_max_rate="200000000"}
parent_name         : []
port_security       : []
tag                 : []
tag_request         : []
type                : localnet
up                  : false

# cat log.txt
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 172.16.104.201 () port 0 AF_INET
Recv   Send    Send                          
Socket Socket  Message  Elapsed              
Size   Size    Size     Time     Throughput  
bytes  bytes   bytes    secs.    10^6bits/sec  

 87380  16384  16384    10.29      21.19            ------------------------works

 options             : {network_name=nattest, qos_burst="2200000", qos_max_rate="20000000"}

# cat log.txt
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 172.16.104.201 () port 0 AF_INET
Recv   Send    Send                          
Socket Socket  Message  Elapsed              
Size   Size    Size     Time     Throughput  
bytes  bytes   bytes    secs.    10^6bits/sec  

 87380  16384  16384    10.29      2.19            ---------------------------works


but when I set options             : {network_name=nattest, qos_burst="220000000", qos_max_rate="2000000000"}

# cat log.txt
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 172.16.104.201 () port 0 AF_INET
Recv   Send    Send                          
Socket Socket  Message  Elapsed              
Size   Size    Size     Time     Throughput  
bytes  bytes   bytes    secs.    10^6bits/sec  

 87380  16384  16384    10.29      95.66   ------------it can only shape to less than 100

and I test other config,  qos_max_rate that is greater than 100 only can shape to about 95.



pls help check if it is the issue of this patch or another new issue.

Comment 5 ying xu 2020-10-14 01:19:40 UTC
I tried on the latest version 
# rpm -qa|grep ovn
ovn2.13-20.09.0-2.el8fdp.x86_64
ovn2.13-central-20.09.0-2.el8fdp.x86_64
ovn2.13-host-20.09.0-2.el8fdp.x86_64

all works!

run on rhel7:
https://beaker.engineering.redhat.com/jobs/4617554

run on rhel8:
https://beaker.engineering.redhat.com/recipes/8879555/tasks/116325841/logs/taskout.log

Comment 7 errata-xmlrpc 2020-10-27 09:49:14 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-2020:4356

Comment 8 Red Hat Bugzilla 2023-09-14 06:08:28 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


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