Handling of "1305 SAVEPOINT does not exist" error

Bug #1859038 reported by Alexander Rubtsov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Medium
Valeriy Saharov

Bug Description

This bug report is originated from https://bugs.launchpad.net/mos/+bug/1830087
A customer has reproduced the issue with the patch https://review.fuel-infra.org/#/c/41328/ applied.

-12-06T16:08:32.124473+09:00 cic-3.domain.tld neutron-server[13033]: 2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource [req-3b12d9d8-061e-4b0d-bb50-c8f845f7a2be 49ba0cb6e80d4b1db881fbe29f174065 138f60f0dde243f48d365de435a3ae07 - - -] create failed
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource Traceback (most recent call last):
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/api/v2/resource.py", line 84, in resource
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource result = method(request=request, **args)
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/api/v2/base.py", line 410, in create
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource return self._create(request, body, **kwargs)
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/oslo_db/api.py", line 148, in wrapper
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource ectxt.value = e.inner_exc
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource self.force_reraise()
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/oslo_db/api.py", line 138, in wrapper
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource return f(*args, **kwargs)
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/api/v2/base.py", line 525, in _create
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource obj)})
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/api/v2/base.py", line 468, in notify
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource resource_registry.set_resources_dirty(request.context)
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/quota/resource_registry.py", line 70, in set_resources_dirty
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource res.mark_dirty(context)
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/quota/resource.py", line 196, in mark_dirty
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource {'tenant_id': tenant_id, 'resource': self.name})
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource self.gen.throw(type, value, traceback)
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/db/api.py", line 109, in autonested_transaction
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource yield tx
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 492, in __exit__
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource self.rollback()
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 419, in rollback
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource transaction._rollback_impl()
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 449, in _rollback_impl
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource t[1].rollback()
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1563, in rollback
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource self._do_rollback()
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1625, in _do_rollback
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource self._savepoint, self._parent)
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 717, in _rollback_to_savepoint_impl
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource self.engine.dialect.do_rollback_to_savepoint(self, name)
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 441, in do_rollback_to_savepoint
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource connection.execute(expression.RollbackToSavepointClause(name))
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource return meth(self, multiparams, params)
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource return connection._execute_clauseelement(self, multiparams, params)
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource compiled_sql, distilled_params
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource context)
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1337, in _handle_dbapi_exception
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource util.raise_from_cause(newraise, exc_info)
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource reraise(type(exception), exception, tb=exc_tb, cause=cause)
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource context)
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource cursor.execute(statement, parameters)
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 219, in execute
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource self.errorhandler(self, exc, value)
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 38, in defaulterrorhandler
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource raise errorvalue
2019-12-06 16:08:32.118 13033 ERROR neutron.api.v2.resource OperationalError: (_mysql_exceptions.OperationalError) (1305, 'SAVEPOINT sa_savepoint_1 does not exist') [SQL: u'ROLLBACK TO SAVEPOINT sa_savepoint_1']

It seems that another upstream patch needs to be backported so that the original patch becomes working:
https://bugs.launchpad.net/oslo.db/+bug/1630899

Changed in mos:
assignee: MOS Maintenance (mos-maintenance) → Valeriy Saharov (vsakharov)
milestone: 9.x-updates → 9.2-mu-16
Changed in mos:
milestone: 9.2-mu-16 → 9.2-mu-15
milestone: 9.2-mu-15 → 9.2-mu-16
Changed in mos:
status: New → In Progress
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to openstack/oslo.db (9.0/mitaka)

Fix proposed to branch: 9.0/mitaka
Change author: Valeriy Saharov <email address hidden>
Review: https://review.fuel-infra.org/41558

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers