ODL deletes QOS policy bound to a port inspiteof Neutron rejecting the policy delete since its associate to a port.

Bug #1647538 reported by Poovizhi
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
New
Undecided
Unassigned

Bug Description

1. Qos Policy is bound to the port

vishal@ubuntu:~/devstack$ neutron port-update 9f2c5d5e-7dca-4482-9dee-b2118be21d4c --qos-policy bw-limiter
Updated port: 9f2c5d5e-7dca-4482-9dee-b2118be21d4c

vishal@ubuntu:~/devstack$ neutron port-show 9f2c5d5e-7dca-4482-9dee-b2118be21d4c
+-----------------------+--------------------------------------------------------------------------------+
| Field | Value |
+-----------------------+--------------------------------------------------------------------------------+
| admin_state_up | True |
| allowed_address_pairs | |
| binding:host_id | ubuntu |
| binding:profile | {} |
| binding:vif_details | {"port_filter": true} |
| binding:vif_type | ovs |
| binding:vnic_type | normal |
| created_at | 2016-12-06T05:28:30Z |
| description | |
| device_id | 0c42d9fb-462b-4ce5-9402-3273c3a4f221 |
| device_owner | compute:nova |
| extra_dhcp_opts | |
| fixed_ips | {"subnet_id": "83b01e0a-860f-4131-9337-d5784b58b604", "ip_address": "5.1.1.6"} |
| id | 9f2c5d5e-7dca-4482-9dee-b2118be21d4c |
| mac_address | fa:16:3e:6f:23:f1 |
| name | |
| network_id | cedf5f96-8524-460e-85bf-112d6a6e3e92 |
| port_security_enabled | True |
| project_id | 8769516ed27c49df9e742a78e6b9c8d7 |
| qos_policy_id | 83068877-b9cc-4dc9-8d60-2fed4ce7be0f |
| revision_number | 8 |
| security_groups | 56c31cf8-63f6-4e01-a9f4-6d90f0aa21f4 |
| status | ACTIVE |
| tenant_id | 8769516ed27c49df9e742a78e6b9c8d7 |
| updated_at | 2016-12-06T05:28:33Z |
+-----------------------+--------------------------------------------------------------------------------+

2. When policy delete is tried

vishal@ubuntu:~/devstack$ neutron qos-policy-delete 83068877-b9cc-4dc9-8d60-2fed4ce7be0f
QoS Policy 83068877-b9cc-4dc9-8d60-2fed4ce7be0f is used by port 9f2c5d5e-7dca-4482-9dee-b2118be21d4c.
Neutron server returns request_ids: ['req-6629b80e-601d-4f51-aa47-01a16bc3291b']
vishal@ubuntu:~/devstack$

3. Neutron qos policy and port from database after tried deleting qos policy

vishal@ubuntu:~/devstack$ neutron qos-policy-show 83068877-b9cc-4dc9-8d60-2fed4ce7be0f
+-----------------+--------------------------------------------------------------+
| Field | Value |
+-----------------+--------------------------------------------------------------+
| created_at | 2016-12-06T05:23:50Z |
| description | |
| id | 83068877-b9cc-4dc9-8d60-2fed4ce7be0f |
| name | bw-limiter |
| project_id | 8769516ed27c49df9e742a78e6b9c8d7 |
| revision_number | 2 |
| rules | d71514ce-148f-47e4-9315-24ed58fe90c1 (type: bandwidth_limit) |
| shared | False |
| tenant_id | 8769516ed27c49df9e742a78e6b9c8d7 |
| updated_at | 2016-12-06T05:24:17Z |
+-----------------+--------------------------------------------------------------+
vishal@ubuntu:~/devstack$ neutron port-show 9f2c5d5e-7dca-4482-9dee-b2118be21d4c
+-----------------------+--------------------------------------------------------------------------------+
| Field | Value |
+-----------------------+--------------------------------------------------------------------------------+
| admin_state_up | True |
| allowed_address_pairs | |
| binding:host_id | ubuntu |
| binding:profile | {} |
| binding:vif_details | {"port_filter": true} |
| binding:vif_type | ovs |
| binding:vnic_type | normal |
| created_at | 2016-12-06T05:28:30Z |
| description | |
| device_id | 0c42d9fb-462b-4ce5-9402-3273c3a4f221 |
| device_owner | compute:nova |
| extra_dhcp_opts | |
| fixed_ips | {"subnet_id": "83b01e0a-860f-4131-9337-d5784b58b604", "ip_address": "5.1.1.6"} |
| id | 9f2c5d5e-7dca-4482-9dee-b2118be21d4c |
| mac_address | fa:16:3e:6f:23:f1 |
| name | |
| network_id | cedf5f96-8524-460e-85bf-112d6a6e3e92 |
| port_security_enabled | True |
| project_id | 8769516ed27c49df9e742a78e6b9c8d7 |
| qos_policy_id | 83068877-b9cc-4dc9-8d60-2fed4ce7be0f |
| revision_number | 8 |
| security_groups | 56c31cf8-63f6-4e01-a9f4-6d90f0aa21f4 |
| status | ACTIVE |
| tenant_id | 8769516ed27c49df9e742a78e6b9c8d7 |
| updated_at | 2016-12-06T05:28:33Z |
+-----------------------+--------------------------------------------------------------------------------+
vishal@ubuntu:~/devstack$

4. When a rest query done on ODL: Policy deleted from ODL but still the policy remains bound to the Port in ODL

Ideally ODL should delete the policy whenever Neutron deletes it. There should not be any inconsistencies between Openstack and ODL databases. I think there should be a bug in the ML2 driver code. If not please assign to the right module.

Tags: qos
Revision history for this message
Poovizhi (poovizhi23) wrote :

possible fix for the bug. Tried this fix, it's working.

Poovizhi (poovizhi23)
affects: networking-odl → neutron
Revision history for this message
Brian Haley (brian-haley) wrote :

Can you create a patch based on your fix and send it out for review?

tags: added: qos
Revision history for this message
Poovizhi (poovizhi23) wrote :

Hi Brian,

I see a bug already raised for this and review is on progress. I had the same fix whatever given in that review. Mostly this bug will become a duplicate of that.
Link to bug:
https://bugs.launchpad.net/neutron/+bug/1646370
Review Link:
https://review.openstack.org/405448

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.