Bug 1931581 - [OVN] QoS FIP rules not correctly updated
Summary: [OVN] QoS FIP rules not correctly updated
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-networking-ovn
Version: 16.1 (Train)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: z6
: 16.1 (Train on RHEL 8.2)
Assignee: Rodolfo Alonso
QA Contact: Eduardo Olivares
URL:
Whiteboard:
Depends On:
Blocks: 1859274 1952393
TreeView+ depends on / blocked
 
Reported: 2021-02-22 17:42 UTC by Eduardo Olivares
Modified: 2022-10-03 14:47 UTC (History)
5 users (show)

Fixed In Version: python-networking-ovn-7.3.1-1.20201114024057.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1952393 (view as bug list)
Environment:
Last Closed: 2021-05-26 13:51:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OSP-540 0 None None None 2022-10-03 14:47:52 UTC
Red Hat Product Errata RHBA-2021:2097 0 None None None 2021-05-26 13:52:12 UTC

Description Eduardo Olivares 2021-02-22 17:42:25 UTC
Description of problem:
An error is raised when trying to update a qos rule associated to a FIP that is attached to a running VM.

(overcloud) [stack@undercloud-0 tempest-dir]$ openstack network qos rule set --max-burst-kbits 800 --max-kbps 800 bw-lim-pol 8c8cffac-bcd4-4575-a667-5a000f402027
Failed to set Network QoS rule ID "8c8cffac-bcd4-4575-a667-5a000f402027": HttpException: 500: Server Error for url: http://10.0.0.135:9696/v2.0/qos/policies/7773994d-6209-47e7-a495-38401ee4d86b/bandwidth_limit_rules/8c8cffac-bcd4-4575-a66
7-5a000f402027, Request Failed: internal server error while processing your request.                                    


The following error can be found on neutron server logs:
2021-02-22 17:28:13.473 28 ERROR neutron.services.qos.drivers.manager [req-cb6cefd8-5456-4b89-b80c-511eb02643b3 9321be76b0eb49efac41a803459b4df0 8cfca0a542324d07ae2769ea4fb74c43 - default default] Extension driver 'OVNQosDriver' failed in
 update_policy: AttributeError: 'str' object has no attribute 'fip_id'                                                                                                                                                                       
2021-02-22 17:28:13.473 28 ERROR neutron.services.qos.drivers.manager Traceback (most recent call last):                                                                                                                                     
2021-02-22 17:28:13.473 28 ERROR neutron.services.qos.drivers.manager   File "/usr/lib/python3.6/site-packages/neutron/services/qos/drivers/manager.py", line 105, in call                                                                   
2021-02-22 17:28:13.473 28 ERROR neutron.services.qos.drivers.manager     getattr(driver, method_name)(*args, **kwargs)                                                                                                                      
2021-02-22 17:28:13.473 28 ERROR neutron.services.qos.drivers.manager   File "/usr/lib/python3.6/site-packages/networking_ovn/ml2/qos_driver.py", line 62, in update_policy                                                                  
2021-02-22 17:28:13.473 28 ERROR neutron.services.qos.drivers.manager     self._driver._ovn_client._qos_driver.update_policy(context, policy)                                                                                                
2021-02-22 17:28:13.473 28 ERROR neutron.services.qos.drivers.manager   File "/usr/lib/python3.6/site-packages/networking_ovn/common/client_extensions/qos.py", line 337, in update_policy                                                   
2021-02-22 17:28:13.473 28 ERROR neutron.services.qos.drivers.manager     fip_binding.fip_id)                                                                                                                                                
2021-02-22 17:28:13.473 28 ERROR neutron.services.qos.drivers.manager AttributeError: 'str' object has no attribute 'fip_id'                                                                                                                 



The rule is correctly updated in the neutron db (800 kbps is the new value):
(overcloud) [stack@undercloud-0 ~]$ openstack network qos rule list bw-lim-pol
+--------------------------------------+--------------------------------------+-----------------+----------+-----------------+----------+-----------+-----------+
| ID                                   | QoS Policy ID                        | Type            | Max Kbps | Max Burst Kbits | Min Kbps | DSCP mark | Direction |
+--------------------------------------+--------------------------------------+-----------------+----------+-----------------+----------+-----------+-----------+
| 8c8cffac-bcd4-4575-a667-5a000f402027 | 7773994d-6209-47e7-a495-38401ee4d86b | bandwidth_limit |      800 |             800 |          |           | egress    |
+--------------------------------------+--------------------------------------+-----------------+----------+-----------------+----------+-----------+-----------+


However, the OVN NBDB is not is not updated:
[root@controller-0 ~]# ovn-nbctl list qos f5e4c34b-3eee-4d8a-9792-06a3b85897d1
_uuid               : f5e4c34b-3eee-4d8a-9792-06a3b85897d1
action              : {}
bandwidth           : {burst=500, rate=500}
direction           : from-lport
external_ids        : {"neutron:fip_id"="9f24c1ea-151a-42a9-8ae9-49eee311fd52"}
match               : "inport == \"2b47155d-dbfe-4d13-b499-0cf9f7a146f2\" && ip4.src == 10.0.0.245 && is_chassis_resident(\"cr-lrp-2b47155d-dbfe-4d13-b499-0cf9f7a146f2\")"
priority            : 2002



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

How reproducible:
100%

Steps to Reproduce:
1) Create server with a FIP attached to it
2) Create QoS policy with a QoS rule and associate it to the FIP
$ openstack network qos policy create bw-lim-pol
$ openstack network qos rule create bw-lim-pol --type bandwidth-limit --max-burst-kbits 500 --max-kbps 500 --egress                                                                                                                     
$ openstack floating ip set --qos-policy bw-lim-pol 10.0.0.245
3) Update the QoS rule
$ openstack network qos rule set --max-burst-kbits 800 --max-kbps 800 bw-lim-pol 8c8cffac-bcd4-4575-a667-5a000f402027

Comment 15 errata-xmlrpc 2021-05-26 13:51:32 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


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