← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1334226] [NEW] Lock wait timeout updating ipavailabilityranges

 

Public bug reported:

Note that this is different from bug
https://bugs.launchpad.net/neutron/+bug/1330638

Traceback:
 neutron.api.v2.resource Traceback (most recent call last):
 neutron.api.v2.resource   File "/opt/stack/new/neutron/neutron/api/v2/resource.py", line 87, in resource
 neutron.api.v2.resource     result = method(request=request, **args)
 neutron.api.v2.resource   File "/opt/stack/new/neutron/neutron/api/v2/base.py", line 447, in create
 neutron.api.v2.resource     obj = obj_creator(request.context, **kwargs)
 neutron.api.v2.resource   File "/opt/stack/new/neutron/neutron/db/l3_db.py", line 148, in create_router
 neutron.api.v2.resource     self._update_router_gw_info(context, router_db['id'], gw_info)
 neutron.api.v2.resource   File "/opt/stack/new/neutron/neutron/db/l3_gwmode_db.py", line 58, in _update_router_gw_info
 neutron.api.v2.resource     context, router_id, info, router=router)
 neutron.api.v2.resource   File "/opt/stack/new/neutron/neutron/db/l3_db.py", line 316, in _update_router_gw_info
 neutron.api.v2.resource     self._create_gw_port(context, router_id, router, network_id)
 neutron.api.v2.resource   File "/opt/stack/new/neutron/neutron/db/l3_db.py", line 306, in _create_gw_port
 neutron.api.v2.resource     self._create_router_gw_port(context, router, new_network)
 neutron.api.v2.resource   File "/opt/stack/new/neutron/neutron/db/l3_db.py", line 255, in _create_router_gw_port
 neutron.api.v2.resource     'name': ''}})
 neutron.api.v2.resource   File "/opt/stack/new/neutron/neutron/plugins/ml2/plugin.py", line 644, in create_port
 neutron.api.v2.resource     result = super(Ml2Plugin, self).create_port(context, port)
 neutron.api.v2.resource   File "/opt/stack/new/neutron/neutron/db/db_base_plugin_v2.py", line 1464, in create_port
 neutron.api.v2.resource     context.session.add(allocated)
 neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 463, in __exit__
 neutron.api.v2.resource     self.rollback()
 neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 57, in __exit__
 neutron.api.v2.resource     compat.reraise(exc_type, exc_value, exc_tb)
 neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 460, in __exit__
 neutron.api.v2.resource     self.commit()
 neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 370, in commit
 neutron.api.v2.resource     self._prepare_impl()
 neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 350, in _prepare_impl
 neutron.api.v2.resource     self.session.flush()
 neutron.api.v2.resource   File "/opt/stack/new/neutron/neutron/openstack/common/db/sqlalchemy/session.py", line 439, in _wrap
 neutron.api.v2.resource     return f(self, *args, **kwargs)
 neutron.api.v2.resource   File "/opt/stack/new/neutron/neutron/openstack/common/db/sqlalchemy/session.py", line 705, in flush
 neutron.api.v2.resource     return super(Session, self).flush(*args, **kwargs)
 neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1907, in flush
 neutron.api.v2.resource     self._flush(objects)
 neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2025, in _flush
 neutron.api.v2.resource     transaction.rollback(_capture_exception=True)
 neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 57, in __exit__
 neutron.api.v2.resource     compat.reraise(exc_type, exc_value, exc_tb)
 neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1989, in _flush
 neutron.api.v2.resource     flush_context.execute()
 neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 371, in execute
 neutron.api.v2.resource     rec.execute(self)
 neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 524, in execute
 neutron.api.v2.resource     uow
 neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 59, in save_obj
 neutron.api.v2.resource     mapper, table, update)
 neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 516, in _emit_update_statements
 neutron.api.v2.resource     execute(statement, params)
 neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 727, in execute
 neutron.api.v2.resource     return meth(self, multiparams, params)
 neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 322, in _execute_on_connection
 neutron.api.v2.resource     return connection._execute_clauseelement(self, multiparams, params)
 neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 824, in _execute_clauseelement
 neutron.api.v2.resource     compiled_sql, distilled_params
 neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 954, in _execute_context
 neutron.api.v2.resource     context)
 neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1116, in _handle_dbapi_exception
 neutron.api.v2.resource     exc_info
 neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 189, in raise_from_cause
 neutron.api.v2.resource     reraise(type(exception), exception, tb=exc_tb)
 neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 947, in _execute_context
 neutron.api.v2.resource     context)
 neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 435, in do_execute
 neutron.api.v2.resource     cursor.execute(statement, parameters)
 neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute
 neutron.api.v2.resource     self.errorhandler(self, exc, value)
 neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
 neutron.api.v2.resource     raise errorclass, errorvalue
 neutron.api.v2.resource OperationalError: (OperationalError) (1205, 'Lock wait timeout exceeded; try restarting transaction') 'UPDATE ipavailabilityranges SET first_ip=%s WHERE ipavailabilityranges.allocation_pool_id = %s AND ipavailabilityranges.first_ip = %s AND ipavailabilityranges.last_ip = %s' ('172.24.4.52', 'd622315c-3c96-48b0-a1ba-9e089fff4ae4', '172.24.4.51', '172.24.4.254')

http://logs.openstack.org/22/101522/5/check/check-tempest-dsvm-neutron-
full/7a21846/logs/screen-q-svc.txt.gz?level=TRACE#_2014-06-24_07_12_13_603

** Affects: neutron
     Importance: High
         Status: New


** Tags: db gate-failure

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1334226

Title:
  Lock wait timeout updating ipavailabilityranges

Status in OpenStack Neutron (virtual network service):
  New

Bug description:
  Note that this is different from bug
  https://bugs.launchpad.net/neutron/+bug/1330638

  Traceback:
   neutron.api.v2.resource Traceback (most recent call last):
   neutron.api.v2.resource   File "/opt/stack/new/neutron/neutron/api/v2/resource.py", line 87, in resource
   neutron.api.v2.resource     result = method(request=request, **args)
   neutron.api.v2.resource   File "/opt/stack/new/neutron/neutron/api/v2/base.py", line 447, in create
   neutron.api.v2.resource     obj = obj_creator(request.context, **kwargs)
   neutron.api.v2.resource   File "/opt/stack/new/neutron/neutron/db/l3_db.py", line 148, in create_router
   neutron.api.v2.resource     self._update_router_gw_info(context, router_db['id'], gw_info)
   neutron.api.v2.resource   File "/opt/stack/new/neutron/neutron/db/l3_gwmode_db.py", line 58, in _update_router_gw_info
   neutron.api.v2.resource     context, router_id, info, router=router)
   neutron.api.v2.resource   File "/opt/stack/new/neutron/neutron/db/l3_db.py", line 316, in _update_router_gw_info
   neutron.api.v2.resource     self._create_gw_port(context, router_id, router, network_id)
   neutron.api.v2.resource   File "/opt/stack/new/neutron/neutron/db/l3_db.py", line 306, in _create_gw_port
   neutron.api.v2.resource     self._create_router_gw_port(context, router, new_network)
   neutron.api.v2.resource   File "/opt/stack/new/neutron/neutron/db/l3_db.py", line 255, in _create_router_gw_port
   neutron.api.v2.resource     'name': ''}})
   neutron.api.v2.resource   File "/opt/stack/new/neutron/neutron/plugins/ml2/plugin.py", line 644, in create_port
   neutron.api.v2.resource     result = super(Ml2Plugin, self).create_port(context, port)
   neutron.api.v2.resource   File "/opt/stack/new/neutron/neutron/db/db_base_plugin_v2.py", line 1464, in create_port
   neutron.api.v2.resource     context.session.add(allocated)
   neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 463, in __exit__
   neutron.api.v2.resource     self.rollback()
   neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 57, in __exit__
   neutron.api.v2.resource     compat.reraise(exc_type, exc_value, exc_tb)
   neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 460, in __exit__
   neutron.api.v2.resource     self.commit()
   neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 370, in commit
   neutron.api.v2.resource     self._prepare_impl()
   neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 350, in _prepare_impl
   neutron.api.v2.resource     self.session.flush()
   neutron.api.v2.resource   File "/opt/stack/new/neutron/neutron/openstack/common/db/sqlalchemy/session.py", line 439, in _wrap
   neutron.api.v2.resource     return f(self, *args, **kwargs)
   neutron.api.v2.resource   File "/opt/stack/new/neutron/neutron/openstack/common/db/sqlalchemy/session.py", line 705, in flush
   neutron.api.v2.resource     return super(Session, self).flush(*args, **kwargs)
   neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1907, in flush
   neutron.api.v2.resource     self._flush(objects)
   neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2025, in _flush
   neutron.api.v2.resource     transaction.rollback(_capture_exception=True)
   neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 57, in __exit__
   neutron.api.v2.resource     compat.reraise(exc_type, exc_value, exc_tb)
   neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1989, in _flush
   neutron.api.v2.resource     flush_context.execute()
   neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 371, in execute
   neutron.api.v2.resource     rec.execute(self)
   neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 524, in execute
   neutron.api.v2.resource     uow
   neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 59, in save_obj
   neutron.api.v2.resource     mapper, table, update)
   neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 516, in _emit_update_statements
   neutron.api.v2.resource     execute(statement, params)
   neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 727, in execute
   neutron.api.v2.resource     return meth(self, multiparams, params)
   neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 322, in _execute_on_connection
   neutron.api.v2.resource     return connection._execute_clauseelement(self, multiparams, params)
   neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 824, in _execute_clauseelement
   neutron.api.v2.resource     compiled_sql, distilled_params
   neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 954, in _execute_context
   neutron.api.v2.resource     context)
   neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1116, in _handle_dbapi_exception
   neutron.api.v2.resource     exc_info
   neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 189, in raise_from_cause
   neutron.api.v2.resource     reraise(type(exception), exception, tb=exc_tb)
   neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 947, in _execute_context
   neutron.api.v2.resource     context)
   neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 435, in do_execute
   neutron.api.v2.resource     cursor.execute(statement, parameters)
   neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute
   neutron.api.v2.resource     self.errorhandler(self, exc, value)
   neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
   neutron.api.v2.resource     raise errorclass, errorvalue
   neutron.api.v2.resource OperationalError: (OperationalError) (1205, 'Lock wait timeout exceeded; try restarting transaction') 'UPDATE ipavailabilityranges SET first_ip=%s WHERE ipavailabilityranges.allocation_pool_id = %s AND ipavailabilityranges.first_ip = %s AND ipavailabilityranges.last_ip = %s' ('172.24.4.52', 'd622315c-3c96-48b0-a1ba-9e089fff4ae4', '172.24.4.51', '172.24.4.254')

  http://logs.openstack.org/22/101522/5/check/check-tempest-dsvm-
  neutron-
  full/7a21846/logs/screen-q-svc.txt.gz?level=TRACE#_2014-06-24_07_12_13_603

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1334226/+subscriptions


Follow ups

References