DB2 deadlock error not detected

Bug #1340793 reported by Bryan Jones
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Invalid
High
Unassigned
Glance
Invalid
Undecided
Unassigned
OpenStack Compute (nova)
Invalid
Low
Unassigned
OpenStack Heat
Invalid
Undecided
Unassigned
OpenStack Identity (keystone)
Invalid
Undecided
Unassigned
neutron
Invalid
Undecided
Unassigned
oslo-incubator
Fix Released
Undecided
Bryan Jones

Bug Description

Currently, only mysql and postgresql deadlock errors are properly handled.
The error message for DB2 looks like:

'SQL0911N The current transaction has been rolled back because of a deadlock or timeout. <deadlock details>'

Olso.db needs to include a regex to detect this deadlock. Essentially the same as
    https://bugs.launchpad.net/nova/+bug/1270725
but for DB2

This is an example error:

2014-07-01 19:52:16.574 2710 TRACE nova.openstack.common.db.sqlalchemy.session ProgrammingError: (ProgrammingError) ibm_db_dbi::ProgrammingError: Statement Execute Failed: [IBM][CLI Driver][DB2/LINUXX8664] SQL0911N The current transaction has been rolled back because of a deadlock or timeout. Reason code "2". SQLSTATE=40001 SQLCODE=-911 'UPDATE reservations SET updated_at=updated_at, deleted_at=?, deleted=id WHERE reservations.deleted = ? AND reservations.uuid IN (?, ?, ?)' (datetime.datetime(2014, 7, 1, 23, 52, 10, 774722), 0, 'e2353f5e-f444-4a94-b7bf-f877402c15ab', 'c4b22c95-284a-4ce3-810b-5d9bbe6dd7b7', 'ab0294cb-c317-4594-9b19-911589228aa5')

Tags: db oslo
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.db (master)

Fix proposed to branch: master
Review: https://review.openstack.org/106458

Changed in oslo:
assignee: nobody → Bryan Jones (jonesbr)
status: New → In Progress
Matt Riedemann (mriedem)
Changed in nova:
status: New → Confirmed
tags: added: db oslo
Matt Riedemann (mriedem)
summary: - DB2 deadlock error not supported
+ DB2 deadlock error not detected
Changed in neutron:
status: New → Confirmed
Jay Bryant (jsbryant)
Changed in cinder:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Matt Riedemann (mriedem) wrote :

The DB2 error code documentation for deadlock:

http://www-01.ibm.com/support/docview.wss?uid=swg21320104

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo-incubator (master)

Fix proposed to branch: master
Review: https://review.openstack.org/107489

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.db (master)

Reviewed: https://review.openstack.org/106458
Committed: https://git.openstack.org/cgit/openstack/oslo.db/commit/?id=7d78e3e1be7b4e45aedb3279caeeb457946c5d1a
Submitter: Jenkins
Branch: master

commit 7d78e3e1be7b4e45aedb3279caeeb457946c5d1a
Author: Bryan Jones <email address hidden>
Date: Fri Jul 11 18:19:40 2014 +0000

    Added check for DB2 deadlock error

    Currently, deadlock is only checked for in mysql and postgresql.
    This adds a check for db2 deadlock

    Fixes bug #1340793

    Change-Id: Icef725ed75929ff13234ea58026e6bf0f2e2c852

Changed in oslo:
status: In Progress → Fix Committed
Matt Riedemann (mriedem)
description: updated
Thierry Carrez (ttx)
Changed in oslo:
milestone: none → juno-2
status: Fix Committed → Fix Released
Sean Dague (sdague)
Changed in nova:
importance: Undecided → Low
Revision history for this message
Brant Knudson (blk-u) wrote :

Keystone is using oslo.db, so if it's fixed in oslo then it's fixed in keystone.

Changed in keystone:
status: New → Invalid
Revision history for this message
Zane Bitter (zaneb) wrote :

Heat is also using oslo.db.

Revision history for this message
Viktor Serhieiev (vsergeyev) wrote :

Glance is using oslo.db, so if it's fixed there then it's fixed in glance as well.

Changed in glance:
status: New → Invalid
Changed in heat:
status: New → Invalid
Revision history for this message
Michal Dulko (michal-dulko-f) wrote :

Cinder is also using oslo.db.

Changed in cinder:
status: Confirmed → Invalid
Changed in nova:
status: Confirmed → Invalid
Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :

Neutron uses oslo.db.

Changed in neutron:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.