updating a qos policy on a bound port from None to a policy with min_bw rules does not update placement allocation

Bug #1915856 reported by Balazs Gibizer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Przemyslaw Szczerbik

Bug Description

1) create a port without qos policy (and also the net has no qos policy)
2) boot a server with the port
3) set the the qos policy of the port for a policy with min_bw rules

Expected:
* port update is rejected as neutron does not know which resource provider the bandwidth needs to be allocated

Actual:
* port update accepted the resource request of the port is updated according to the new policy but placement allocation does not created

Reproduction with printouts: http://paste.openstack.org/show/802704/

A variant of the bug:
1) create a port with qos policy
2) boot a server with that port
3) update the port qos policy to None (note it is only possible with the REST API, the CLI client does not support $openstack port set --no-qos-policy)
4) update the qos policy of the port from None to an existing qos policy

Expected:
* same as above

Actual:
* same as above

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

An extra note at step 3) in the reproduction the allocation key of the port binding still points to the same RP as after step 2) even if the allocation from the RP is properly removed. See printouts in http://paste.openstack.org/show/802717/

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

Hm the two reproduction of the bug seems to be different regarding step 3) and the allocation key in the port binding.

In the first reproduction there is no way to have an allocation key as nova never set one in the first place during the boot of the VM as at that time there was no resource request of the port. At step 3) the new qos policy is accepted by neutron and the resource request is updated but no allocation.

While in the second reproduction case there is an allocation key set originally by nova at boot time as at that time there was a port resource request. When the qos policy is then removed from the port neutron updated the resource request and deleted the allocation from placement, but kept the allocation key in the port binding. Then at step 4) when the qos policy is set again on the port neutron accepted the new qos policy but did _not_ update the resource request of the port and did not update the placement allocation either.

Changed in neutron:
assignee: Lajos Katona (lajos-katona) → Przemyslaw Szczerbik (pszczerbik)
Revision history for this message
Przemyslaw Szczerbik (pszczerbik) wrote :

Expected behavior is incorrect. Port update must succeed, without updating Placement allocation record. This is critical, as not all users use Placement enforcement, but they still expect dataplane enforcement to happen. This behavior is described in [1]. Relevant part:

"As it is possible to update a port to remove the QoS policy, updating it back to have QoS policy with minimum_bandwidth rule will not result in placement allocation record, only the dataplane enforcement will happen."

This issue was fixed in [2], which deletes allocation key in the port binding when QoS policy is set to None.

[1] https://opendev.org/openstack/neutron/src/branch/master/doc/source/admin/config-qos-min-bw.rst#L77
[2] https://review.opendev.org/c/openstack/neutron/+/805637

Changed in neutron:
status: Confirmed → Fix Committed
Revision history for this message
Balazs Gibizer (balazs-gibizer) wrote :

Thanks Przemek!

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

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

Changed in neutron:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (stable/xena)

Change abandoned by "Rodolfo Alonso <email address hidden>" on branch: stable/xena
Review: https://review.opendev.org/c/openstack/neutron/+/817951
Reason: Please, feel free to restore the patch, address the comments and rebase the patch.

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.