TestNetworkQuotaBasic tearDownClass fails while deleting port

Bug #1254236 reported by Armando Migliaccio
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Unassigned

Bug Description

Port delete fails and lead to this stacktrace:

ft4.1: tearDownClass (tempest.scenario.test_network_quotas.TestNetworkQuotaBasic)_StringException: Traceback (most recent call last):
  File "tempest/scenario/manager.py", line 248, in tearDownClass
    thing.delete()
  File "tempest/api/network/common.py", line 96, in delete
    self.client.delete_port(self.id)
  File "/opt/stack/new/python-neutronclient/neutronclient/v2_0/client.py", line 111, in with_params
    ret = self.function(instance, *args, **kwargs)
  File "/opt/stack/new/python-neutronclient/neutronclient/v2_0/client.py", line 326, in delete_port
    return self.delete(self.port_path % (port))
  File "/opt/stack/new/python-neutronclient/neutronclient/v2_0/client.py", line 1232, in delete
    headers=headers, params=params)
  File "/opt/stack/new/python-neutronclient/neutronclient/v2_0/client.py", line 1221, in retry_request
    headers=headers, params=params)
  File "/opt/stack/new/python-neutronclient/neutronclient/v2_0/client.py", line 1164, in do_request
    self._handle_fault_response(status_code, replybody)
  File "/opt/stack/new/python-neutronclient/neutronclient/v2_0/client.py", line 1134, in _handle_fault_response
    exception_handler_v20(status_code, des_error_body)
  File "/opt/stack/new/python-neutronclient/neutronclient/v2_0/client.py", line 84, in exception_handler_v20
    message=error_dict)
NeutronClientException: Request Failed: internal server error while processing your request.

Neutron's log reveal this nasty trace:

[req-30fa1925-067f-4320-883c-a95b3f0630b8 885beea8ad4e4d77a4c69eee7303f28b f1c02eacabf946abaa3eff289e0df1a9] delete failed
2013-11-23 02:57:41.578 3524 TRACE neutron.api.v2.resource Traceback (most recent call last):
2013-11-23 02:57:41.578 3524 TRACE neutron.api.v2.resource File "/opt/stack/new/neutron/neutron/api/v2/resource.py", line 84, in resource
2013-11-23 02:57:41.578 3524 TRACE neutron.api.v2.resource result = method(request=request, **args)
2013-11-23 02:57:41.578 3524 TRACE neutron.api.v2.resource File "/opt/stack/new/neutron/neutron/api/v2/base.py", line 432, in delete
2013-11-23 02:57:41.578 3524 TRACE neutron.api.v2.resource obj_deleter(request.context, id, **kwargs)
2013-11-23 02:57:41.578 3524 TRACE neutron.api.v2.resource File "/opt/stack/new/neutron/neutron/plugins/ml2/plugin.py", line 657, in delete_port
2013-11-23 02:57:41.578 3524 TRACE neutron.api.v2.resource super(Ml2Plugin, self).delete_port(context, id)
2013-11-23 02:57:41.578 3524 TRACE neutron.api.v2.resource File "/opt/stack/new/neutron/neutron/db/db_base_plugin_v2.py", line 1403, in delete_port
2013-11-23 02:57:41.578 3524 TRACE neutron.api.v2.resource self._delete_port(context, id)
2013-11-23 02:57:41.578 3524 TRACE neutron.api.v2.resource File "/opt/stack/new/neutron/neutron/db/db_base_plugin_v2.py", line 1423, in _delete_port
2013-11-23 02:57:41.578 3524 TRACE neutron.api.v2.resource port = query.with_lockmode('update').one()
2013-11-23 02:57:41.578 3524 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2184, in one
2013-11-23 02:57:41.578 3524 TRACE neutron.api.v2.resource ret = list(self)
2013-11-23 02:57:41.578 3524 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2227, in __iter__
2013-11-23 02:57:41.578 3524 TRACE neutron.api.v2.resource return self._execute_and_instances(context)
2013-11-23 02:57:41.578 3524 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2242, in _execute_and_instances
2013-11-23 02:57:41.578 3524 TRACE neutron.api.v2.resource result = conn.execute(querycontext.statement, self._params)
2013-11-23 02:57:41.578 3524 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1449, in execute
2013-11-23 02:57:41.578 3524 TRACE neutron.api.v2.resource params)
2013-11-23 02:57:41.578 3524 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1584, in _execute_clauseelement
2013-11-23 02:57:41.578 3524 TRACE neutron.api.v2.resource compiled_sql, distilled_params
2013-11-23 02:57:41.578 3524 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1698, in _execute_context
2013-11-23 02:57:41.578 3524 TRACE neutron.api.v2.resource context)
2013-11-23 02:57:41.578 3524 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1691, in _execute_context
2013-11-23 02:57:41.578 3524 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 331, in do_execute
2013-11-23 02:57:41.578 3524 TRACE neutron.api.v2.resource cursor.execute(statement, parameters)
2013-11-23 02:57:41.578 3524 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute
2013-11-23 02:57:41.578 3524 TRACE neutron.api.v2.resource self.errorhandler(self, exc, value)
2013-11-23 02:57:41.578 3524 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
2013-11-23 02:57:41.578 3524 TRACE neutron.api.v2.resource raise errorclass, errorvalue
2013-11-23 02:57:41.578 3524 TRACE neutron.api.v2.resource OperationalError: (OperationalError) (1205, 'Lock wait timeout exceeded; try restarting transaction') 'SELECT ports.tenant_id AS ports_tenant_id, ports.id AS ports_id, ports.name AS ports_name, ports.network_id AS ports_network_id, ports.mac_address AS ports_mac_address, ports.admin_state_up AS ports_admin_state_up, ports.status AS ports_status, ports.device_id AS ports_device_id, ports.device_owner AS ports_device_owner \nFROM ports \nWHERE ports.id = %s FOR UPDATE' ('7bd9b18d-47f3-4a57-8cbe-63c800a0c6fb',)
2013-11-23 02:57:41.578 3524 TRACE neutron.api.v2.resource

Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :
Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :
Changed in neutron:
assignee: nobody → Armando Migliaccio (armando-migliaccio)
assignee: Armando Migliaccio (armando-migliaccio) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (master)

Reviewed: https://review.openstack.org/58827
Committed: http://github.com/openstack/neutron/commit/da00ed76e6008bd06dada0f0441ae436dd759cdf
Submitter: Jenkins
Branch: master

commit da00ed76e6008bd06dada0f0441ae436dd759cdf
Author: Salvatore Orlando <email address hidden>
Date: Wed Nov 27 14:09:25 2013 +0000

    Revert "ML2 plugin should not delete ports on subnet deletion"

    This reverts commit 0d131ff0e9964cb6a65f64809270f9d597c2d5d1

    There is really no problem with this change. However, it is probably
    triggering a port_update notification to the agent for each port
    with an allocated IP.
    The agent handles that notification in a way which might be improved
    from a scalability perspective.

    I don't actually want this change to removed, I am just checking
    whether neutron without it passess jobs.

    Change-Id: I5494b607127b261043dcddfdc10c93a28ec20af5
    Related-Bug: 1253896
    Related-Bug: 1254236

Changed in neutron:
status: New → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
milestone: none → icehouse-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: icehouse-1 → 2014.1
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.