Bug 1852383 - _mysql_exceptions.OperationalError - DBDeadlock when update_user is called within Keystone
Summary: _mysql_exceptions.OperationalError - DBDeadlock when update_user is called wi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-keystone
Version: 13.0 (Queens)
Hardware: x86_64
OS: Linux
high
high
Target Milestone: z16
: 13.0 (Queens)
Assignee: Grzegorz Grasza
QA Contact: Jeremy Agee
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-30 10:08 UTC by Dariusz Wojewódzki
Modified: 2024-10-01 16:41 UTC (History)
5 users (show)

Fixed In Version: openstack-keystone-13.0.4-7.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-06-16 10:58:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1885753 0 None None None 2020-06-30 16:42:49 UTC
OpenStack gerrit 738677 0 None NEW Wrap update_user in wrap_db_retry 2021-02-14 21:35:09 UTC
Red Hat Issue Tracker OSP-258 0 None None None 2022-10-03 14:45:09 UTC
Red Hat Product Errata RHBA-2021:2385 0 None None None 2021-06-16 10:59:47 UTC

Description Dariusz Wojewódzki 2020-06-30 10:08:58 UTC
Description of problem:

Failed user operations on keystone.
Problem is related to creation or updating user information on keystone side

Version-Release number of selected component (if applicable):
openstack-keystone-13.0.2-6.el7ost.noarch
memcached-1.4.39-2.el7ost.x86_64     



Actual results:

When update_user is called within Keystone it leads to a Deadlock on the DB.

Error logs like below occur often in the cluster. 

020-06-29 14:42:38.694 40239 ERROR keystone.common.wsgi [req-1faddeb5-1ee6-4a2a-8b20-cea5ca3f5a09 5d151d3afb574af78c6f2757ffdd1f18 9b4e9d2b80b74bea926636fb0f4f0519 - default default] (_mysql_exceptions.OperationalError) (1213, 'Deadlock found when trying to get lock; try restarting transaction') [SQL: u'DELETE FROM password WHERE password.id = %s'] [parameters: ((31144958L,), (31144961L,), (31144963L,), (31144964L,), (31144968L,), (31144969L,), (31144970L,), (31144972L,)  ... displaying 10 of 13 total bound parameter sets ...  (31144976L,), (31144978L,))] (Background on this error at: http://sqlalche.me/e/e3q8): DBDeadlock: (_mysql_exceptions.OperationalError) (1213, 'Deadlock found when trying to get lock; try restarting transaction') [SQL: u'DELETE FROM password WHERE password.id = %s'] [parameters: ((31144958L,), (31144961L,), (31144963L,), (31144964L,), (31144968L,), (31144969L,), (31144970L,), (31144972L,)  ... displaying 10 of 13 total bound parameter sets ...  (31144976L,), (31144978L,))] (Background on this error at: http://sqlalche.me/e/e3q8)
2020-06-29 14:42:38.694 40239 ERROR keystone.common.wsgi Traceback (most recent call last):
2020-06-29 14:42:38.694 40239 ERROR keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/common/wsgi.py", line 226, in __call__

020-06-29 14:42:44.226 39779 ERROR keystone.common.wsgi [req-bc1cc682-b2d9-4374-b543-f850d7485f00 5d151d3afb574af78c6f2757ffdd1f18 9b4e9d2b80b74bea926636fb0f4f0519 - default default] UPDATE statement on table 'password' expected to update 1 row(s); 0 were matched.: StaleDataError: UPDATE statement on table 'password' expected to update 1 row(s); 0 were matched.
2020-06-29 14:42:44.226 39779 ERROR keystone.common.wsgi Traceback (most recent call last):
2020-06-29 14:42:44.226 39779 ERROR keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/common/wsgi.py", line 226, in __call__

Comment 39 errata-xmlrpc 2021-06-16 10:58:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat OpenStack Platform 13.0 bug fix and enhancement advisory), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:2385


Note You need to log in before you can comment on or make changes to this bug.