Neutron port-update fails to roll back the binding:profile data in ports table in neutron DB if a MechanismDriverError thrown by a mechanism driver

Bug #1486150 reported by Ashish Kumar Gupta
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
neutron
Expired
Undecided
Unassigned

Bug Description

Steps to reproduce:
1. Inherit the update_port_precommit(self, context) in the vendor mechanism driver
2. Throw MechanismDriverError in this method based on validation

Expected output:
None of the updated port parameters should be added in DB for the ports table as well as ml2_port_bindings table.

Actual output:
Eventhough the MechanismDriverError thrown by the vendor mechanism driver , ml2 plugin updates the value in the DB.
Attached the logs in paste site:
http://paste.openstack.org/show/420233/

Neutron port-update REST API output:

Earlier neutron port was created with local_link_information: “port_id” as Ten-GigabitEthernet1/0/36 using port-create command

sdn@IronicVM:/opt/stack/logs$ curl -g -i -X PUT http://localhost:9696/v2.0/ports/"a3f10e8b-ee32-4e39-85cc-9ae34335302f" -H "User-Agent: python-neutronclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: fab9f04cb1eb47b48848fe25b61678cf" -d '{"port": { "binding:profile": {"local_link_information":[{ "switch_id" : "44:31:92:61:89:d2", "port_id" :"Ten-GigabitEthernet1/0/38"}], "bind_requested": false}, "binding:vnic_type" : "baremetal", "binding:host_id" : "baremetal", "name": "P1", "admin_state_up": true}}'
HTTP/1.1 500 Internal Server Error
Content-Type: application/json; charset=UTF-8
Content-Length: 108
X-Openstack-Request-Id: req-2d6a5ea7-1389-40f3-abb9-86b898c256e5
Date: Fri, 15 Apr 2016 11:30:30 GMT

{"NeutronError": {"message": "update_port_precommit failed.", "type": "MechanismDriverError", "detail": ""}}sdn@IronicVM:/opt/stack/logs$
sdn@IronicVM:/opt/stack/logs$

sdn@IronicVM:/opt/stack/logs$ neutron port-show p1
+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------+
| admin_state_up | True |
| allowed_address_pairs | |
| binding:host_id | baremetal |
| binding:profile | {"local_link_information": [{"port_id": "Ten-GigabitEthernet1/0/38", "switch_id": "44:31:92:61:89:d2"}], "bind_requested": false} |
| binding:vif_details | {} |
| binding:vif_type | unbound |
| binding:vnic_type | baremetal |
| device_id | |
| device_owner | |
| extra_dhcp_opts | |
| fixed_ips | |
| id | a3f10e8b-ee32-4e39-85cc-9ae34335302f |
| mac_address | fa:16:3e:60:c7:b8 |
| name | P1 |
| network_id | 5be51697-ea2b-46a8-a65b-9b4894b80b3a |
| port_security_enabled | True |
| security_groups | e39e3b81-2336-4619-8501-b10900753f44 |
| status | ACTIVE |
| tenant_id | fd415d61bf5c4ba3bb80d0b407315f5d |
+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------+

Changed in neutron:
assignee: nobody → Koteswara Rao Kelam (koti-kelam)
Phani Pawan (ppawan)
Changed in neutron:
assignee: Koteswara Rao Kelam (koti-kelam) → Phani Pawan (ppawan)
Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

This bug is > 240 days without activity. We are unsetting assignee and milestone and setting status to Incomplete in order to allow its expiry in 60 days.

If the bug is still valid, then update the bug status.

Changed in neutron:
assignee: Phani Pawan (ppawan) → nobody
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for neutron because there has been no activity for 60 days.]

Changed in neutron:
status: Incomplete → Expired
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.