Incorrect pass exception with oslo_db.enginefacade

Bug #1520567 reported by Pavel Kholkin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Pavel Kholkin

Bug Description

After ignore and pass exception the following exception could happen:

sqlalchemy.exc.InvalidRequestError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (sqlite3.IntegrityError) UNIQUE constraint failed: instance_info_caches.instance_uuid

We are in a transaction, we can't have an integrity failure in a transaction, and then just continue working, we need to use a savepoint.

The problem could be reproduced e.g. in instance_info_cache_update but also could happen in other similar places where we pass an db exception.

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

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

Changed in nova:
importance: Low → Medium
status: In Progress → Confirmed
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/250790
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=4dbf1decf91f208b15805983fb4d6de5ccafe74a
Submitter: Jenkins
Branch: master

commit 4dbf1decf91f208b15805983fb4d6de5ccafe74a
Author: Pavel Kholkin <email address hidden>
Date: Fri Nov 27 15:34:34 2015 +0300

    bug and tests in 'instance_info_cache'

    Added unit tests for 'instance_info_cache' db section,
    fixed incorrect behaviour with ignoring exception that relates
    to introducing oslo.db enginefacade.

    Closes-Bug: #1520563
    Closes-Bug: #1520567

    Co-Authored-By: Sergey Nikitin <email address hidden>

    Change-Id: I35ec688d7b176e0cb0b9ce6bd0c241b6631422c5

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/nova 13.0.0.0b3

This issue was fixed in the openstack/nova 13.0.0.0b3 development milestone.

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.