bandwidth resource allocation is deleted from placement during unrelated port update

Bug #1898994 reported by Balazs Gibizer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Lajos Katona

Bug Description

Neutron deletes the bandwidth resource allocation in placement if the port is updated even though the qos policy of the port is not changed.

Reproduction:
1) Create a all in one devstack deployment from master

2) Create qos a port with qos min bandwidth policy

openstack network create net0 \
--provider-network-type vlan \
--provider-physical-network physnet0 \
--provider-segment 100 \
##
openstack subnet create subnet0 \
--network net0 \
--subnet-range 10.0.4.0/24 \
##
openstack network qos policy create qp0
openstack network qos rule create qp0 \
--type minimum-bandwidth \
--min-kbps 1000 \
--egress \
##
openstack network qos rule create qp0 \
--type minimum-bandwidth \
--min-kbps 1000 \
--ingress \
##
openstack port create port-normal-qos \
--network net0 \
--vnic-type normal \
--qos-policy qp0 \
##

3) Boot a server with that port
openstack --os-compute-api-version 2.80 server create --flavor c1 --image cirros-0.5.1-x86_64-disk --nic port-id=port-normal-qos vm1 --wait

4) Check the resource allocation of the server in placement
openstack resource provider allocation show cf5809b6-1dbe-43d5-8270-b734255a946e
+--------------------------------------+------------+--------------------------------------------------------------------------+
| resource_provider | generation | resources |
+--------------------------------------+------------+--------------------------------------------------------------------------+
| 1110cf59-cabf-526c-bacc-08baabbac692 | 13 | {'NET_BW_EGR_KILOBIT_PER_SEC': 1000, 'NET_BW_IGR_KILOBIT_PER_SEC': 1000} |
| 7b122d5c-02cd-499c-a415-c07029498010 | 21 | {'VCPU': 1, 'MEMORY_MB': 256, 'DISK_GB': 1} |
+--------------------------------------+------------+--------------------------------------------------------------------------+

5) Update the description of the port
openstack port set --description "this is my port" port-normal-qos

6) Check the resource allocation again
openstack resource provider allocation show cf5809b6-1dbe-43d5-8270-b734255a946e
+--------------------------------------+------------+---------------------------------------------+
| resource_provider | generation | resources |
+--------------------------------------+------------+---------------------------------------------+
| 7b122d5c-02cd-499c-a415-c07029498010 | 22 | {'VCPU': 1, 'MEMORY_MB': 256, 'DISK_GB': 1} |
+--------------------------------------+------------+---------------------------------------------+
Expected behavior:
The resource allocation is not changed during description update

Actual behavior:
The bandwidth resource allocation is deleted in placement

Note that changing the binding:profile also has the same effect, but changing the name of the port does not trigger the same problem.

Tags: qos
tags: added: qos
tags: added: placement
description: updated
Changed in neutron:
status: New → Confirmed
assignee: nobody → Lajos Katona (lajos-katona)
importance: Undecided → High
Revision history for this message
Balazs Gibizer (balazs-gibizer) wrote :

As a consequence of the above problem when the server later deleted neutron fails to unbind the port so the port remains in use.

The only visible problem in the neutron log during the delete:

Oct 08 08:27:40 aio neutron-server[843]: DEBUG neutron_lib.callbacks.manager [req-61512f24-826a-424a-a866-74915d1c9d9b req-3fb1ce31-2470-4e51-b283-4928a2a87b9c service neutron] Callback neutron.services.qos.qos_plugin.QoSPlugin._check_port_for_placement_allocation_change--9223372036854757806 raised Resource provider 1110cf59-cabf-526c-bacc-08baabbac692 for cf5809b6-1dbe-43d5-8270-b734255a946e does not exist {{(pid=2968) _notify_loop /opt/stack/neutron-lib/neutron_lib/callbacks/manager.py:210}}

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/756892

Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.opendev.org/756892
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=3605e9f82de73e0c9d3b6c8a6a99cda05bea8f4e
Submitter: Zuul
Branch: master

commit 3605e9f82de73e0c9d3b6c8a6a99cda05bea8f4e
Author: elajkat <email address hidden>
Date: Thu Oct 8 09:58:06 2020 +0200

    QoS policy update with placement: handle missing key

    Closes-Bug: #1898994
    Change-Id: Ibb826346117cd5cc824fff55d123497a19370f5c

Changed in neutron:
status: In Progress → Fix Released
tags: added: neutron-proactive-backport-potential
tags: removed: neutron-proactive-backport-potential placement
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 18.0.0.0rc1

This issue was fixed in the openstack/neutron 18.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.