Bug 1427818 - [backport] exception translation for pymysql "Lock wait timeout exceeded" broken Edit
Summary: [backport] exception translation for pymysql "Lock wait timeout exceeded" bro...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-oslo-db
Version: 8.0 (Liberty)
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: async
: 8.0 (Liberty)
Assignee: Michael Bayer
QA Contact: Asaf Hirshberg
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-01 10:16 UTC by Aviv Guetta
Modified: 2020-04-15 15:31 UTC (History)
11 users (show)

Fixed In Version: python-oslo-db-2.6.0-5.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1428026 (view as bug list)
Environment:
Last Closed: 2017-06-20 12:48:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
runs a mysql deadlock through oslo.db (815 bytes, text/plain)
2017-03-20 13:48 UTC, Michael Bayer
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:1542 0 normal SHIPPED_LIVE Red Hat OpenStack Platform 8 Bug Fix and Enhancement Advisory 2017-06-20 16:45:36 UTC

Description Aviv Guetta 2017-03-01 10:16:38 UTC
** exception translation for pymysql "Lock wait timeout exceeded" broken Edit

- Backport request for upstream bug:

https://bugs.launchpad.net/oslo.db/+bug/1608691.

- There is already a backport for mitaka:
https://review.openstack.org/350161.

- We would like to have a backport to OSP 8.

Comment 2 Michael Bayer 2017-03-01 15:57:30 UTC
the mitaka backport was released in oslo.db 4.7.1: https://review.openstack.org/#/c/352370/

however our own python-oslo-db for rhos-9.0 is still on 4.6.0: http://pkgs.devel.redhat.com/cgit/rpms/python-oslo-db/tree/python-oslo-db.spec?h=rhos-9.0-rhel-7

so this backport should be across both rhos-9.0 and rhos-8.0.

Comment 11 Michael Bayer 2017-03-20 13:48:58 UTC
Created attachment 1264761 [details]
runs a mysql deadlock through oslo.db

here's how to test this:

1. environment has a running MariaDB server, with the usual "root"/ "no password" login (we can add a password to the script if need be)

2. environment has target version of oslo.db installed

3. run script:

    python oslo_db_deadlock.py

output will show a bunch of SQL, then end with a stack trace, at the bottom will be:

    oslo_db.exception.DBDeadlock: (pymysql.err.InternalError) (1205, u'Lock wait timeout exceeded; try restarting transaction') [SQL: 'select * from x for update']


if the patch *didn't* work, then you will see:

    oslo_db.exception.DBError: (pymysql.err.InternalError) (1205, u'Lock wait timeout exceeded; try restarting transaction') [SQL: 'select * from x for update']

Comment 12 Asaf Hirshberg 2017-03-23 07:01:12 UTC
Verified.

[root@controller-0 heat-admin]# rpm -qa |grep python-oslo-db
python-oslo-db-2.6.0-5.el7ost.noarch
[root@controller-0 heat-admin]# cat /usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/exc_filters.py |sed -n '61p'
@filters("mysql", sqla_exc.DatabaseError,
[root@controller-0 heat-admin]#

Comment 15 errata-xmlrpc 2017-06-20 12:48:10 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, 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-2017:1542


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