Bug 1427818
| Summary: | [backport] exception translation for pymysql "Lock wait timeout exceeded" broken Edit | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Aviv Guetta <aguetta> | ||||
| Component: | python-oslo-db | Assignee: | Michael Bayer <mbayer> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Asaf Hirshberg <ahirshbe> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 8.0 (Liberty) | CC: | apevec, dcadzow, dciabrin, dwojewod, fdinitto, jjoyce, lhh, mbayer, mschuppe, pablo.iranzo, ushkalim | ||||
| Target Milestone: | async | Keywords: | FeatureBackport, Triaged, ZStream | ||||
| Target Release: | 8.0 (Liberty) | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | python-oslo-db-2.6.0-5.el7ost | Doc Type: | If docs needed, set a value | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | |||||||
| : | 1428026 (view as bug list) | Environment: | |||||
| Last Closed: | 2017-06-20 12:48:10 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
Aviv Guetta
2017-03-01 10:16:38 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. 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']
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]#
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 |