Bug 1928231

Summary: [OVN] QoS rules not applied to distributed FIP traffic
Product: Red Hat OpenStack Reporter: Eduardo Olivares <eolivare>
Component: python-networking-ovnAssignee: Rodolfo Alonso <ralonsoh>
Status: CLOSED ERRATA QA Contact: Eduardo Olivares <eolivare>
Severity: high Docs Contact:
Priority: high    
Version: 16.1 (Train)CC: apevec, jlibosva, lhh, lmartins, majopela, ralonsoh, scohen
Target Milestone: z6Keywords: Triaged
Target Release: 16.1 (Train on RHEL 8.2)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-networking-ovn-7.3.1-1.20201114024054.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-26 13:51:28 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: 1926191    
Bug Blocks: 1859274    

Description Eduardo Olivares 2021-02-12 17:02:03 UTC
Description of problem:
First of all, in order to reproduce this issue, BZ1926191 needs to be resolved. Otherwise, qos-fip cannot be used with OVN. A hotfix was used to reproduce this bug.

Steps:
1. Create a qos policy with bw limit and/or dscp marking
openstack network qos policy create bw-limiter
openstack network qos rule create --type bandwidth-limit --egress --max-kbps 100 --max-burst-kbits 100 bw-limiter
openstack network qos rule create --type bandwidth-limit --ingress --max-kbps 100 --max-burst-kbits 100 bw-limiter
openstack network qos rule create --type dscp-marking --dscp-mark 26 bw-limiter

2. Assign that qos-policy to an existing FIP (which is attached to a running server)
openstack floating ip set --qos-policy bw-limiter 10.0.0.211

3. Check the qos-policies are NOT applied, which is a bug


Info from the QoS table at NBDB:
[root@controller-2 ~]# ovn-nbctl list QoS  
_uuid               : 647abfc4-49b0-4f2b-ad35-52afd6e4f63c
action              : {}
bandwidth           : {burst=100, rate=100}
direction           : to-lport
external_ids        : {"neutron:fip_id"="158dee8c-fc48-47a0-a29d-48a01710f889"}                                                                                                                                                              
match               : "outport == \"6ab04b5c-ed26-4587-973c-fff2da5c31ab\" && ip4.dst == 10.0.0.211 && is_chassis_resident(\"cr-lrp-6ab04b5c-ed26-4587-973c-fff2da5c31ab\")"                                                                 
priority            : 2002
                                                                                                                                                                                                  
_uuid               : 95883b77-2f04-4019-8d08-85507424f993
action              : {dscp=26}
bandwidth           : {burst=100, rate=100}
direction           : from-lport
external_ids        : {"neutron:fip_id"="158dee8c-fc48-47a0-a29d-48a01710f889"}
match               : "inport == \"6ab04b5c-ed26-4587-973c-fff2da5c31ab\" && ip4.src == 10.0.0.211 && is_chassis_resident(\"cr-lrp-6ab04b5c-ed26-4587-973c-fff2da5c31ab\")"
priority            : 2002


Apparently, the last element of the "match" rule does not match the packets: is_chassis_resident(\"cr-lrp-6ab04b5c-ed26-4587-973c-fff2da5c31ab\")


[root@controller-2 ~]# ovn-sbctl find Port_Binding logical_port="cr-lrp-6ab04b5c-ed26-4587-973c-fff2da5c31ab" | grep "^chassis"
chassis             : 5bead493-9911-4615-94cc-88670f78f1bf       
[root@controller-2 ~]# ovn-sbctl list chassis 5bead493-9911-4615-94cc-88670f78f1bf   | grep hostname
hostname            : controller-0.redhat.local

                                                                                                                                                                             




Version-Release number of selected component (if applicable):
RHOS-16.1-RHEL-8-20210205.n.0

How reproducible:
100%

Comment 16 errata-xmlrpc 2021-05-26 13:51:28 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 (Red Hat OpenStack Platform 16.1.6 bug fix and enhancement advisory), 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:2097