Comment 10 for bug 1943724

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

Reviewed: https://review.opendev.org/c/openstack/neutron-lib/+/817528
Committed: https://opendev.org/openstack/neutron-lib/commit/997be4d13b183b5f9bac1462da5aeaec0c44714d
Submitter: "Zuul (22348)"
Branch: stable/xena

commit 997be4d13b183b5f9bac1462da5aeaec0c44714d
Author: Przemyslaw Szczerbik <email address hidden>
Date: Tue Nov 2 11:24:44 2021 +0100

    [stable-only] Fix allocation update for min bw rule with different direction

    Neutron API supports QoS policy change on a bound port. The new QoS
    policy can contain a different set of rules, or different values. In
    case of QoS minimum bandwidth rule, it can be min_kbps or direction
    attribute. If the new QoS minimum bandwidth rule is different than the
    one in previous QoS policy, Placement allocation has to be updated.

    An issue arises when QoS minimum bandwidth rule direction is changed.
    Ingress and egress directions are represented with separate resource
    classes: NET_BW_IGR_KILOBIT_PER_SEC and NET_BW_EGR_KILOBIT_PER_SEC
    respectively. During direction change, resource class representing old
    direction is freed and a resource class representing the new direction
    is requested. update_qos_minbw_allocation() implementation always
    expects requested resource class to be present in the allocation that
    is being updated, but that assumption is wrong. If current Placement
    allocation record doesn't contain particular resource class, we need to
    use 0 as a default value.

    Similarly, we should defer deletion of RP from request body until all
    items from minbw_alloc_diff are processed. Only then we can be certain
    that this RR is not going to have any resources.

    This commit is based on 47a08e36bf864806ca71ea77ffcf6602d4e5db04.

    Partial-Bug: #1943724
    Change-Id: I9a0df4d461c0e73ba07ca18648f16a982a2e267b