Bug 2010672

Summary: [ovn migration] QoS info not saved into OVN NBDB
Product: Red Hat OpenStack Reporter: Eduardo Olivares <eolivare>
Component: python-networking-ovnAssignee: Rodolfo Alonso <ralonsoh>
Status: CLOSED NEXTRELEASE QA Contact: Eran Kuris <ekuris>
Severity: high Docs Contact:
Priority: high    
Version: 16.1 (Train)CC: apevec, egarciar, jlibosva, lhh, majopela, scohen
Target Milestone: z10Keywords: AutomationBlocker, Triaged
Target Release: 16.1 (Train on RHEL 8.2)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2011206 (view as bug list) Environment:
Last Closed: 2022-11-14 16:33:21 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: 2011206, 2043613    

Description Eduardo Olivares 2021-10-05 10:25:40 UTC
Description of problem:
Reproduced with OVN migration job + tobiko tests:
https://rhos-ci-staging-jenkins.lab.eng.tlv2.redhat.com/job/DFG-network-networking-ovn-16.1_director-rhel-virthost-3cont_2comp-ipv4-vxlan-ml2ovs-to-ovn-migration/12/


A tenant network is created with a QoS policy including a BW limit and DSCP marking. A VM connected to that network is created.
Both cases (BW limit and DSCP marking) are verified (see tests test_qos_bw_limit and test_ping_dscp in the following report):
http://rhos-ci-logs.lab.eng.tlv2.redhat.com/logs/staging/DFG-network-networking-ovn-16.1_director-rhel-virthost-3cont_2comp-ipv4-vxlan-ml2ovs-to-ovn-migration/12/infrared/.workspaces/workspace_2021-10-04_11-14-05/tobiko_create-resources/tobiko_create-resources_create_resources_scenario.html


After the OVN migration is successfully completed, the same tests are executed on the same VM. The BW limit is correctly applied, but the DSCP marking is not (see tests test_qos_bw_limit and test_ping_dscp in the following report, the second one fails):
http://rhos-ci-logs.lab.eng.tlv2.redhat.com/logs/staging/DFG-network-networking-ovn-16.1_director-rhel-virthost-3cont_2comp-ipv4-vxlan-ml2ovs-to-ovn-migration/12/infrared/.workspaces/workspace_2021-10-04_11-14-05/tobiko_check-resources/tobiko_check-resources_check_resources_scenario.html






The information about QoS is right in the neutron DB after the migration:
(overcloud) [stack@undercloud-0 ~]$ openstack network show 569b37f1-3dd4-402e-9244-d7fad1ec4804 -c qos_policy_id -f value
85d22adf-fc02-4c6d-b17a-36183d206558
(overcloud) [stack@undercloud-0 ~]$ openstack network qos policy show 85d22adf-fc02-4c6d-b17a-36183d206558 -c rules -f value
[{'max_kbps': 1000, 'max_burst_kbps': 800, 'direction': 'egress', 'id': 'fd1fffa5-b3ae-4b24-ba81-dfce2cccbe17', 'qos_policy_id': '85d22adf-fc02-4c6d-b17a-36183d206558', 'type': 'bandwidth_limit'}, {'dscp_mark': 40, 'id': '49e3e48b-b9e1-4332-9756-603134ee25fa', 'qos_policy_id': '85d22adf-fc02-4c6d-b17a-36183d206558', 'type': 'dscp_marking'}]


But there is no QoS information in the OVN NBDB:
[root@controller-0 ~]# ovn-nbctl find logical_switch name=neutron-569b37f1-3dd4-402e-9244-d7fad1ec4804
_uuid               : 10c127dd-639b-455d-94e9-7de881abef9e
acls                : []
dns_records         : [8c29e850-26bd-4be9-8fe5-e87e84912ef9]
external_ids        : {"neutron:mtu"="1442", "neutron:network_name"=tobiko.openstack.stacks._qos.QosNetworkStackFixture-network-76zr72iw3bn5, "neutron:revision_number"="6"}
forwarding_groups   : []
load_balancer       : []
name                : neutron-569b37f1-3dd4-402e-9244-d7fad1ec4804
other_config        : {mcast_flood_unregistered="false", mcast_snoop="true", vlan-passthru="false"}
ports               : [031d8606-2855-4404-89a8-539ec6bf31a7, 144619e6-8ec6-43d5-8e26-f0d0fab2676f, 488e8f77-64b0-40b5-82e8-dc3d79eab851, 4c3a538f-69cf-4241-ab9b-bb1c56e7f513, 6205219c-1593-42b2-a28c-bc856d6978b2, 8a518aac-ab99-486b-9ddc-4b82accb9cfd, 8fe8118c-cf6e-40cc-89bf-4b831f5ba770, a3ff89e4-4f5f-420d-8f86-6890d5f8e157, a8eef773-b7d1-411e-8308-c6434bc5b92d]
qos_rules           : []

[root@controller-0 ~]# ovn-nbctl list qos
# the output is empty





Version-Release number of selected component (if applicable):
RHOS-16.1-RHEL-8-20210928.n.1 + https://code.engineering.redhat.com/gerrit/c/networking-ovn/+/278809

How reproducible:
So far, only reproduced once.

Steps to Reproduce:
1. create workload with QoS including a DSCP marking rule
2. migrate from ml2/ovs to ml2/ovs
3. check ovn db / capture egress packets from the created VM and check their ToS=0

Comment 4 Jakub Libosvar 2022-11-14 16:33:21 UTC
This will be fixed in 16.2