oslo.db's master breaks unittest in OS projects

Bug #1367354 reported by Viktor Serhieiev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Low
Unassigned
OpenStack Identity (keystone)
Fix Released
Medium
Unassigned
oslo.db
Fix Released
Critical
Mike Bayer
keystone (Ubuntu)
Fix Released
Medium
James Page

Bug Description

When I run the unittests in different OpennStack projects using the latest oslo.db there were a lot of failures on Nova, Neutron and Keystone. The lot of tests raises OperationalError: (OperationalError) cannot start a transaction within a transaction 'BEGIN' () The right approach is to fix these projects, but we are in the end of J release, so I'm not sure, that we can merge these fixes fast.

This issue was caused by commit [1], so the faster and simplest approach is - to revert this commit an continue our fork on this in K

[1] https://github.com/openstack/oslo.db/commit/78fd290a89545de31e5c13f3085df23368a8afaa

Mike Bayer (zzzeek)
Changed in oslo.db:
assignee: nobody → Mike Bayer (zzzeek)
Revision history for this message
Viktor Serhieiev (vsergeyev) wrote :

See attempt to fiz this issue in Nova - https://review.openstack.org/#/c/115255/

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

See also WIP fix to Keystone - https://review.openstack.org/#/c/120146/

Revision history for this message
Mike Bayer (zzzeek) wrote :

Here's the issue: the fact that we currently use the StaticPool implementation with SQLite, which shares a single SQLite connection for all requests; any API method which makes use of multiple sessions at once (not a good idea, but this is prevalent throughout nova, neutron) will therefore share the same SQLite connection with multiple SQLAlchemy Connection wrappers that are not aware of the existing state.

The fix proposed at https://review.openstack.org/#/c/120148/ adds a marker into the .info dictionary to track this condition.

Ultimately we absolutely should not be creating ad-hoc sessions throughout nova, neutron, etc., this is an obvious performance and concurrency issue. The StaticPool then is kind of a hack on top of a hack.

Changed in oslo.db:
milestone: none → juno-rc1
importance: Undecided → Critical
status: New → In Progress
Changed in oslo.db:
status: In Progress → Fix Committed
Changed in nova:
status: New → Fix Committed
status: Fix Committed → In Progress
Changed in keystone:
status: New → Fix Committed
Revision history for this message
Viktor Serhieiev (vsergeyev) wrote :
Sean Dague (sdague)
Changed in nova:
importance: Undecided → Medium
Sean Dague (sdague)
Changed in nova:
status: In Progress → Confirmed
importance: Medium → Low
Changed in oslo.db:
status: Fix Committed → Fix Released
Revision history for this message
Roman Podoliaka (rpodolyaka) wrote :

Hmm, it seems that we've got another broken test in Nova in a change on review - https://review.openstack.org/#/c/119100/ I'm wondering if it's related to this bug, as I'm seeing a really weird behaviour here - http://xsnippet.org/360192/raw/

Dolph Mathews (dolph)
Changed in keystone:
milestone: none → juno-rc1
importance: Undecided → Medium
James Page (james-page)
Changed in keystone (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
assignee: nobody → James Page (james-page)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package keystone - 1:2014.2~b3-0ubuntu2

---------------
keystone (1:2014.2~b3-0ubuntu2) utopic; urgency=medium

  * Start failing package builds on unit test failures again:
    - d/rules: Fail build on any test failures.
    - d/p/skip-pysaml2.patch: Skip federation tests for now as pysaml2 is
      not yet in Ubuntu main and federation is only a contrib module.
    - d/p/bug-1371620.patch: Cherry pick fix from upstream VCS for db locking
      issues with sqlite during package install (LP: #1371620).
    - d/p/bug-1367354.patch: Cherry pick fix from upstream VCS to ensure that
      downgrade tests on sqlite complete successfully (LP: #1367354).
    - d/control: Add missing python-ldappool to BD's.
  * d/control: Align version requirements for pycadf and six with upstream.
  * d/p/series: Re-enable disabled add-version-info.patch.
 -- James Page <email address hidden> Mon, 29 Sep 2014 15:34:45 +0100

Changed in keystone (Ubuntu):
status: Triaged → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: juno-rc1 → 2014.2
Changed in nova:
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.