← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2099706] Re: [OVN][QoS] QoS rule addition to an exiting net work policy only updates the first port

 

Reviewed:  https://review.opendev.org/c/openstack/neutron/+/942516
Committed: https://opendev.org/openstack/neutron/commit/8160f2d20ed706600ee618759476c14d38d1ef19
Submitter: "Zuul (22348)"
Branch:    master

commit 8160f2d20ed706600ee618759476c14d38d1ef19
Author: Rodolfo Alonso Hernandez <ralonsoh@xxxxxxxxxx>
Date:   Sat Feb 22 03:36:22 2025 +0000

    [OVN][QoS] Don't change the input parameter in ``_add_port_qos_rules``
    
    The method ``OVNClientQosExtension.update_policy`` iterates over the
    ports in a network and updates the new QoS policy rules on them. This is
    done calling the method ``OVNClientQosExtension._add_port_qos_rules``
    that retrieves the QoS rules in the parameter ``qos_rules``, that is
    a dictionary. This value is used in the loop that updates all the
    Logical_Switch_Ports. If this dictionary is modified, the next calls
    will contain wrong information.
    
    Closes-Bug: #2099706
    Change-Id: Iaa94310d008be84e3a71441b24afa8a8df9d87eb


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/2099706

Title:
  [OVN][QoS] QoS rule addition to an exiting net work policy only
  updates the first port

Status in neutron:
  Fix Released

Bug description:
  How to reproduce:
  * Create a network.
  * Add two ports to this network.
  * Create a QoS policy.
  * Assign the QoS policy to this network.
  * Add a max-bw rule to this policy
  --> Only one port of this network will receive the new added rule.

  The method that updates a QoS policy when, for example, a new rule is
  added, calls ``update_network`` [1] with a set of defined rules in a
  dictionary. This method will call ``_update_port_qos_rules`` [2] with
  this dictionary as an argument. The problem is that in [3], this
  dictionary is modified when it should be used in a loop of calls for
  other ports.

  This argument ``qos_rules`` should not be changed; instead a copy
  should be created.

  [1]https://github.com/openstack/neutron/blob/8152b83384c45d48a7256dfb40a2eb06852d5295/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/extensions/qos.py#L519-L520
  [2]https://github.com/openstack/neutron/blob/8152b83384c45d48a7256dfb40a2eb06852d5295/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/extensions/qos.py#L392-L393
  [3]https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/extensions/qos.py#L309-L310

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/2099706/+subscriptions



References