Comment 0 for bug 1898994

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

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