QOS minimum bandwidth rejection of non-physnet network and updates should be driver specific

Bug #1861442 reported by Tom Stappaerts
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Unassigned

Bug Description

When adding a qos policy to a network or port, there is the following check in the qos_plugin:
            # minimum-bandwidth rule is only supported (independently of
            # drivers) on networks whose first segment is backed by a physnet
            if rule.rule_type == qos_consts.RULE_TYPE_MINIMUM_BANDWIDTH:
                net = network_object.Network.get_object(
                    context, id=port.network_id)
                physnet = net.segments[0].physical_network
                if physnet is None:
                    raise qos_exc.QosRuleNotSupported(rule_type=rule.rule_type,
                                                      port_id=port['id'])
To my knowledge this statement is simply untrue as it is precisly the reference drivers which have this problem, not necessarily all drivers. This blocks me from creating a qos_driver that does support mimimum bandwidth without a physnet.
The same goes for min_bw_rule_updates when the port is bound.

I propose we move those checks to the qos_drivers themselves.

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

Hello:

Just to add a bit of context, this other bug [1] is related to this one. [1] introduced this limitation; the physnet is the source of BW and that's how the min-BW can be guaranteed, by knowing the amount of BW avaiable.

Regards.

[1] https://bugs.launchpad.net/neutron/+bug/1819029

Revision history for this message
Slawek Kaplonski (slaweq) wrote :

We discussed about this on today's drivers meeting: http://eavesdrop.openstack.org/meetings/neutron_drivers/2020/neutron_drivers.2020-01-31-14.00.log.html#l-43

Here is brief summary of our discussion:
- issue mentioned in this LP should be treated as regular bug - we simply did validation if network is phys_net in wrong place. Instead of doing it in qos_plugin: https://github.com/openstack/neutron/blob/master/neutron/services/qos/qos_plugin.py#L229 we should move it to the driver.is_rule_supported() method: https://opendev.org/openstack/neutron-lib/src/branch/master/neutron_lib/services/qos/base.py#L71

- after this will be fixed, if You want to use min bw rules without phys_nets, there will be problem with reporting available bw to the placement. We should think about how to report bandwidth in such case and that should be new RFE.

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

Fix proposed to branch: master
Review: https://review.opendev.org/705694

Changed in neutron:
assignee: nobody → Bence Romsics (bence-romsics)
status: New → In Progress
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/705695

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

Reviewed: https://review.opendev.org/705694
Committed: https://git.openstack.org/cgit/openstack/neutron-lib/commit/?id=6f3fb7fc8199b8c374e6e97a2e5a617a47b30671
Submitter: Zuul
Branch: master

commit 6f3fb7fc8199b8c374e6e97a2e5a617a47b30671
Author: Bence Romsics <email address hidden>
Date: Tue Feb 4 14:02:22 2020 +0100

    Extend qos DriverBase with validate_rule_for_port()

    The openvswitch qos driver supports the min-bw qos rule only on
    networks backed by physnets. Currently the qos driver interface does
    not have a method that takes both the policy/rule and the network/port,
    therefore we don't have enough information in the driver to tell if
    we support the min-bw rule for a port or not. This change introduces
    validate_rule_for_port(..., rule, port) so we have all the information
    to tell.

    The base method validate_rule_for_port() is concrete and returns True
    for backwards compatibility.

    Change-Id: I58a47bb895bede219cfeebbf0665aaf01660ce89
    Needed-By: https://review.opendev.org/705695
    Partial-Bug: #1861442
    Related-Bug: #1819029

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

Reviewed: https://review.opendev.org/705695
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=321afc8f897c8132ddc6edd2b59285111d0d73e0
Submitter: Zuul
Branch: master

commit 321afc8f897c8132ddc6edd2b59285111d0d73e0
Author: Bence Romsics <email address hidden>
Date: Tue Feb 4 14:02:30 2020 +0100

    Move rejection of min-bw rule on non-physnet port to the ovs qos driver

    The ovs qos driver only supports the min-bw rule on physnet ports.
    However other (future) qos drivers may support the min-bw rule on
    non-physnet ports too, therefore implementing the rejection of the
    unsupported combination in the qos plugin was a bug.

    This change moves the rejection from the qos plugin to the ovs qos
    driver.

    Change-Id: I02d77a03c411dc8ab303a7d7b53d7ea93cc9f4c6
    Closes-Bug: #1861442
    Depends-On: https://review.opendev.org/705694
    Related-Bug: #1819029

Changed in neutron:
status: In Progress → Fix Released
tags: added: neutron-proactive-backport-potential
tags: removed: neutron-proactive-backport-potential
tags: added: qos
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/c/openstack/neutron/+/787492

Revision history for this message
Slawek Kaplonski (slaweq) wrote : auto-abandon-script

This bug has had a related patch abandoned and has been automatically un-assigned due to inactivity. Please re-assign yourself if you are continuing work or adjust the state as appropriate if it is no longer valid.

Changed in neutron:
assignee: Bence Romsics (bence-romsics) → nobody
tags: added: timeout-abandon
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (stable/train)

Change abandoned by "Slawek Kaplonski <email address hidden>" on branch: stable/train
Review: https://review.opendev.org/c/openstack/neutron/+/787492
Reason: This review is > 4 weeks without comment and currently blocked by a core reviewer with a -2. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and contacting the reviewer with the -2 on this review to ensure you address their concerns.

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.