minimum_packet_rate qos rule type is not visible in the GET /v2.0/qos/rule-types response

Bug #1959749 reported by Balazs Gibizer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Rodolfo Alonso

Bug Description

The GET /v2.0/qos/rule-types API does not return the minimum_packet_rate rule type even though the feature itself is configured, qos policy can be created with that rule type and ports can be bound with such qos policy.

It is reproduced on recent neutron and neutron-lib master in a devstack.

stack@master0:~/neutron$ git log --oneline | head -n1
e7b70521d0 Merge "Use elevated context to update router's external gateway"

stack@master0:~/neutron-lib$ git log --oneline | head -n1
c5fd706 Merge "Add "connectivity" property to "MechanismDriver""

Example outputs from this system:

stack@master0:~$ openstack network qos rule type list

+-------------------+
| Type |
+-------------------+
| minimum_bandwidth |
| bandwidth_limit |
+-------------------+

stack@master0:~$ openstack network qos rule list qp3-bw-pps

+--------------------------------------+--------------------------------------+---------------------+----------+-----------------+----------+-----------+-----------+
| ID | QoS Policy ID | Type | Max Kbps | Max Burst Kbits | Min Kbps | DSCP mark | Direction |
+--------------------------------------+--------------------------------------+---------------------+----------+-----------------+----------+-----------+-----------+
| 27a29b90-ce72-4f9c-8a0f-e36596a62e19 | 53bc1d66-c4ce-4f98-b703-8ae29afab6b1 | minimum_bandwidth | | | 2000 | | egress |
| 2872f1cd-88df-4f13-a689-d53a2b4bf923 | 53bc1d66-c4ce-4f98-b703-8ae29afab6b1 | minimum_bandwidth | | | 2000 | | ingress |
| 3aa02806-fe95-4bd9-b840-3d7472466f72 | 53bc1d66-c4ce-4f98-b703-8ae29afab6b1 | minimum_packet_rate | | | | | any |
+--------------------------------------+--------------------------------------+---------------------+----------+-----------------+----------+-----------+-----------+

Tags: api
tags: added: api
Changed in neutron:
assignee: nobody → Rodolfo Alonso (rodolfo-alonso-hernandez)
importance: Undecided → High
importance: High → Medium
Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

Hello Balazs:

What driver were you using? Was that OVN+SR-IOV? I'm saying that because of the output.

Since [1], we return only the QoS rule types accepted by all loaded mechanism drivers. That means, for example, if you are using OVN, the supported rule set won't have the "packet_rate_limit" rule type.

However, you can create a rule of any type. When you try to assign an unsupported rule to a driver, the API will raise an exception.

However, if we use several drivers, what we should do is to return not the common subset (intersection) but the joined set (union). But this is an opinion.

Regards.

[1]https://review.opendev.org/c/openstack/neutron/+/468982

Revision history for this message
Balazs Gibizer (balazs-gibizer) wrote :

I use ovs + sriov backend. Booting with a port using the minimum_packet_rate rule type works. I agree that the rule type list should be an union not an intersect. However I do see that the original fix was reverted as this fix might be against a legacy API contract.

Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

Hello again:

OK, what I proposed before was already implemented and discarded [1].

What I propose for any user is:
1) Print the QoS rule types (all):
  $ openstack network qos rule type list

2) Print the QoS rule detail. That will return what loaded drivers support this one. E.g: https://paste.opendev.org/show/812486/. In this example I'm running a deployment with OVS only.

Is that OK for you? I know this is not a straightforward method to make this check, but could be enough for your purposes.

Regards.

[1]https://review.opendev.org/q/3299cdffae5cd7196a1676da103da5e2e413ec21

Revision history for this message
Balazs Gibizer (balazs-gibizer) wrote :

Both 1) and 2) is OK for me.

Actually 2) already works for minimum_packet_rate too https://paste.opendev.org/show/812487/

Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

Thanks!

Changed in neutron:
status: New → Won't Fix
Changed in neutron:
status: Won't Fix → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/827683

Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron-lib (master)

Reviewed: https://review.opendev.org/c/openstack/neutron-lib/+/827533
Committed: https://opendev.org/openstack/neutron-lib/commit/683bca82151bf1b33b172d439e0fd1ed47dabe57
Submitter: "Zuul (22348)"
Branch: master

commit 683bca82151bf1b33b172d439e0fd1ed47dabe57
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Wed Feb 2 17:08:47 2022 +0000

    Add filter flags for QoS rule types

    Added two filter flags for the QoS rule type API definition:
    - all_supported: if True, the listing call will print all QoS rule
      types supported by at least one loaded mechanism driver.
    - all_rules: if True, the listing call will print all QoS rule types
      supported by the Neutron server.

    Both flags are exclusive and not required.

    Change-Id: I8836de91fb5f47f64b44035bfe3fbb4f8a9f63a0
    Related-Bug: #1959749

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/827683
Committed: https://opendev.org/openstack/neutron/commit/2f944d310554f0248261fff875141bdf9698b35e
Submitter: "Zuul (22348)"
Branch: master

commit 2f944d310554f0248261fff875141bdf9698b35e
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Thu Feb 3 00:04:02 2022 +0000

    Support filtering for QoS rule type list

    Added support for filtering the QoS rule type list command.
    Two new filter flags are added:
    - all_supported: if True, the listing call will print all QoS rule
      types supported by at least one loaded mechanism driver.
    - all_rules: if True, the listing call will print all QoS rule types
      supported by the Neutron server.

    Both filter flags are exclusive and not required.

    Depends-On: https://review.opendev.org/c/openstack/neutron-lib/+/827533

    Closes-Bug: #1959749
    Change-Id: I41eaab177e121316c3daec34b309c266e2f81979

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 21.0.0.0rc1

This issue was fixed in the openstack/neutron 21.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.