yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #36991
[Bug 1486150] [NEW] 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
Public bug reported:
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 |
+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------+
** Affects: neutron
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1486150
Title:
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
Status in neutron:
New
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 |
+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------+
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1486150/+subscriptions
Follow ups