sqlalchemy-migrate 0.9.2 is breaking nova unit tests

Bug #1368391 reported by Joe Gordon
32
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Critical
Ihar Hrachyshka
Havana
Fix Released
Critical
Ihar Hrachyshka
Icehouse
Fix Released
Critical
Tristan Cacqueray
Glance
Fix Released
Critical
Adam Gandelman
Havana
Fix Released
Undecided
Unassigned
Icehouse
Fix Released
Critical
Adam Gandelman
OpenStack Compute (nova)
Fix Released
Critical
Joe Gordon
Havana
Fix Released
Undecided
Unassigned
Icehouse
Fix Released
Critical
Adam Gandelman
sqlalchemy-migrate
Fix Released
High
Ihar Hrachyshka

Bug Description

sqlalchemy-migrate 0.9.2 is breaking nova unit tests

OperationalError: (OperationalError) cannot commit - no transaction is active u'COMMIT;' ()

http://logs.openstack.org/39/117839/18/gate/gate-nova-python27/8a7aa8c/

Sean Dague (sdague)
Changed in nova:
status: New → Confirmed
importance: Undecided → Critical
Revision history for this message
Matt Riedemann (mriedem) wrote :

This is the change in the 0.9.2 release that's breaking it:

https://review.openstack.org/#/c/110611/

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/120893

Changed in nova:
assignee: nobody → Joe Gordon (jogo)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/120893
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=9c2d6f21854bc79f03095163b8133a9fec68f9f2
Submitter: Jenkins
Branch: master

commit 9c2d6f21854bc79f03095163b8133a9fec68f9f2
Author: Joe Gordon <email address hidden>
Date: Thu Sep 11 12:38:57 2014 -0700

    Block sqlalchemy migrate 0.9.2 as it breaks all of nova

    This is breaking nova unit tests

    Change-Id: Ic82d787e41f7b6d6153d3c6b19902cc11a1c43bb
    Closes-Bug: #1368391

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
Eric Harney (eharney) wrote :
Eric Harney (eharney)
Changed in cinder:
status: New → In Progress
importance: Undecided → Critical
Tom Barron (tpb)
Changed in cinder:
status: In Progress → Confirmed
Eric Harney (eharney)
Changed in cinder:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/120998

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/120999

Changed in glance:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

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

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

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/121007

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

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/121009

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/121010

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/121012

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/121013

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/121028

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

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

Changed in cinder:
assignee: nobody → Ihar Hrachyshka (ihar-hrachyshka)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/121062

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/121063

ling-yun (zengyunling)
Changed in glance:
assignee: nobody → ling-yun (zengyunling)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/120907
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=eb01ccba28b0feabe6220c125776fee3c2c52505
Submitter: Jenkins
Branch: master

commit eb01ccba28b0feabe6220c125776fee3c2c52505
Author: Eric Harney <email address hidden>
Date: Thu Sep 11 16:53:11 2014 -0400

    Block sqlalchemy-migrate 0.9.2

    Breaks unit tests.

    Closes-Bug: #1368391

    Change-Id: Ic814a91038800201603baf33ca40e4586944343b

Changed in cinder:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (stable/icehouse)

Change abandoned by Adam Gandelman (<email address hidden>) on branch: stable/icehouse
Review: https://review.openstack.org/120998
Reason: https://review.openstack.org/#/c/121062/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (stable/havana)

Change abandoned by Adam Gandelman (<email address hidden>) on branch: stable/havana
Review: https://review.openstack.org/120999
Reason: https://review.openstack.org/#/c/121063/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Adam Gandelman (<email address hidden>) on branch: stable/havana
Review: https://review.openstack.org/121013
Reason: https://review.openstack.org/#/c/121063/

Revision history for this message
Matt Riedemann (mriedem) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/havana)

Reviewed: https://review.openstack.org/121009
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=8ffded729b65d52c21b048e2eff6f6265cc588fe
Submitter: Jenkins
Branch: stable/havana

commit 8ffded729b65d52c21b048e2eff6f6265cc588fe
Author: Joe Gordon <email address hidden>
Date: Thu Sep 11 12:38:57 2014 -0700

    Block sqlalchemy migrate 0.9.2 as it breaks all of nova

    This is breaking nova unit tests

    Closes-Bug: #1368391
    (cherry picked from commit 9c2d6f21854bc79f03095163b8133a9fec68f9f2)

    Change-Id: Ic82d787e41f7b6d6153d3c6b19902cc11a1c43bb

Changed in glance:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/121001
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=a8e54eccbb11ccdff2ac336514e669bc9218b5c9
Submitter: Jenkins
Branch: master

commit a8e54eccbb11ccdff2ac336514e669bc9218b5c9
Author: Adam Gandelman <email address hidden>
Date: Fri Sep 12 00:14:23 2014 -0700

    Block sqlalchemy-migrate 0.9.2

    Breaks unit tests.

    Change-Id: I347a20fd35ae20f1de5db7f2608090b08af6c0ff
    Closes-Bug: #1368391

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (stable/havana)

Reviewed: https://review.openstack.org/121012
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=a3bca656104d3067912de73176d5ae0beee51b37
Submitter: Jenkins
Branch: stable/havana

commit a3bca656104d3067912de73176d5ae0beee51b37
Author: Adam Gandelman <email address hidden>
Date: Fri Sep 12 00:14:23 2014 -0700

    Block sqlalchemy-migrate 0.9.2

    Breaks unit tests.

    Closes-Bug: #1368391
    (cherry picked from commit a8e54eccbb11ccdff2ac336514e669bc9218b5c9)

    Change-Id: I347a20fd35ae20f1de5db7f2608090b08af6c0ff

ling-yun (zengyunling)
Changed in glance:
assignee: ling-yun (zengyunling) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/icehouse)

Reviewed: https://review.openstack.org/121062
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=8178590a9c999070e24bb516cffb7da41287a745
Submitter: Jenkins
Branch: stable/icehouse

commit 8178590a9c999070e24bb516cffb7da41287a745
Author: Eric Harney <email address hidden>
Date: Thu Sep 11 16:53:11 2014 -0400

    Block sqlalchemy-migrate 0.9.2

    Breaks unit tests.

    Conflicts:
     requirements.txt

    Closes-Bug: #1368391
    Change-Id: Ic814a91038800201603baf33ca40e4586944343b
    (cherry picked from commit eb01ccba28b0feabe6220c125776fee3c2c52505)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/havana)

Reviewed: https://review.openstack.org/121063
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=a4d595b4a8adee9a96f7b56bfd8347056bc88b2a
Submitter: Jenkins
Branch: stable/havana

commit a4d595b4a8adee9a96f7b56bfd8347056bc88b2a
Author: Eric Harney <email address hidden>
Date: Thu Sep 11 16:53:11 2014 -0400

    Block sqlalchemy-migrate 0.9.2

    Breaks unit tests.

    Conflicts:
     requirements.txt

    Closes-Bug: #1368391
    Change-Id: Ic814a91038800201603baf33ca40e4586944343b
    (cherry picked from commit eb01ccba28b0feabe6220c125776fee3c2c52505)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/icehouse)

Reviewed: https://review.openstack.org/121007
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=4a8d6ca1ac9292d859b479eece8b741ad1163776
Submitter: Jenkins
Branch: stable/icehouse

commit 4a8d6ca1ac9292d859b479eece8b741ad1163776
Author: Joe Gordon <email address hidden>
Date: Thu Sep 11 12:38:57 2014 -0700

    Block sqlalchemy migrate 0.9.2 as it breaks all of nova

    This is breaking nova unit tests

    Closes-Bug: #1368391
    (cherry picked from commit 9c2d6f21854bc79f03095163b8133a9fec68f9f2)

    Change-Id: Ic82d787e41f7b6d6153d3c6b19902cc11a1c43bb

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (stable/icehouse)

Reviewed: https://review.openstack.org/121010
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=f43b1c2612580ddd8430c8d5cc7a07831c6ae97e
Submitter: Jenkins
Branch: stable/icehouse

commit f43b1c2612580ddd8430c8d5cc7a07831c6ae97e
Author: Adam Gandelman <email address hidden>
Date: Fri Sep 12 00:14:23 2014 -0700

    Block sqlalchemy-migrate 0.9.2

    Breaks unit tests.

    Closes-Bug: #1368391
    (cherry picked from commit a8e54eccbb11ccdff2ac336514e669bc9218b5c9)

    Change-Id: I347a20fd35ae20f1de5db7f2608090b08af6c0ff

Dolph Mathews (dolph)
Changed in glance:
milestone: none → juno-rc1
Dolph Mathews (dolph)
Changed in glance:
importance: Undecided → Critical
assignee: nobody → Adam Gandelman (gandelman-a)
Thierry Carrez (ttx)
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → juno-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: none → juno-rc1
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/121032
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=675e0e5889cce269a758abf5fc6933dd09b0f9fd
Submitter: Jenkins
Branch: master

commit 675e0e5889cce269a758abf5fc6933dd09b0f9fd
Author: Ihar Hrachyshka <email address hidden>
Date: Fri Sep 12 10:57:34 2014 +0200

    SQL scripts should not manage transactions

    Cinder SQL scripts assume too much about the environment and the way in
    which they are executed by sqlalchemy-migrate. Particularly, they manage
    transactions on their own even though sqlalchemy-migrate do it itself,
    plus it assumes that scripts are executed in one go (even though
    standard Python DB-API 2.0 does not mention multi-statement SQL commands
    to be executed on DB cursors.

    blueprint enable-mysql-connector

    Change-Id: I10c58b3af75d3ab9153a8bbd2a539bf1577de328
    Closes-Bug: 1368391

Thierry Carrez (ttx)
Changed in glance:
milestone: juno-rc1 → 2014.2
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-rc1 → 2014.2
Thierry Carrez (ttx)
Changed in cinder:
milestone: juno-rc1 → 2014.2
Revision history for this message
Matt Riedemann (mriedem) wrote :

The migrate patch is here: https://review.openstack.org/#/c/121517/

Changed in sqlalchemy-migrate:
importance: Undecided → High
status: New → In Progress
assignee: nobody → Ihar Hrachyshka (ihar-hrachyshka)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to sqlalchemy-migrate (master)

Reviewed: https://review.openstack.org/121517
Committed: https://git.openstack.org/cgit/stackforge/sqlalchemy-migrate/commit/?id=938757e7aa581646a6a501426a5dae84ebe5631f
Submitter: Jenkins
Branch: master

commit 938757e7aa581646a6a501426a5dae84ebe5631f
Author: Ihar Hrachyshka <email address hidden>
Date: Mon Sep 15 13:58:07 2014 +0200

    Ignore transaction management statements in SQL scripts

    Now that we don't run SQL script with a single .execute() call,
    transaction management statements (BEGIN, COMMIT, END) fail with
    operational error. Ignore them if occurred in a script.

    All in all, transactions are managed by SQLAlchemy-migrate itself, so
    there is no reason for the calling code to pass those statements in a
    SQL script. Warn user about the statements that are ignored.

    The ideal response to such a warning from library users is removing
    those redundant transaction management statements from their scripts.

    Note: ROLLBACK is not ignored even though it's one of transaction
    management statements because its usage in migration scripts is insane
    anyway, and we're better fail on it and not (almost) silently ignore it.

    Change-Id: Ie4179c0e9341d42656d66821aaac23f8dcd33927
    Closes-bug: 1368391

Changed in sqlalchemy-migrate:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/121033
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=92a7111e9e5a9e3494ba1ce074f673bc11328c63
Submitter: Jenkins
Branch: master

commit 92a7111e9e5a9e3494ba1ce074f673bc11328c63
Author: Ihar Hrachyshka <email address hidden>
Date: Fri Sep 12 11:02:31 2014 +0200

    SQL scripts should not manage transactions

    Glance SQL scripts assume too much about the environment and the way in
    which they are executed by sqlalchemy-migrate. Particularly, they manage
    transactions on their own even though sqlalchemy-migrate do it itself,
    plus it assumes that scripts are executed in one go (even though
    standard Python DB-API 2.0 does not mention multi-statement SQL commands
    to be executed on DB cursors.

    Also fix comments to be actual SQL comments and not C comments

    https://blueprints.launchpad.net/oslo.db/+spec/enable-mysql-connector

    Change-Id: I10c58b3af75d3ab9153a8bbd2a539bf1577de328
    Closes-Bug: 1368391
    Closes-Bug: 1410494

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on glance (stable/juno)

Change abandoned by Ihar Hrachyshka (<email address hidden>) on branch: stable/juno
Review: https://review.openstack.org/147217
Reason: We're going to cap sqlalchemy-migrate version instead.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on glance (stable/icehouse)

Change abandoned by Ihar Hrachyshka (<email address hidden>) on branch: stable/icehouse
Review: https://review.openstack.org/147218
Reason: We're going to cap sqlalchemy-migrate version instead.

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

Reviewed: https://review.openstack.org/121028
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=1a488589089ba5e5e44560badbea8e9c8a9fc3fe
Submitter: Jenkins
Branch: master

commit 1a488589089ba5e5e44560badbea8e9c8a9fc3fe
Author: Ihar Hrachyshka <email address hidden>
Date: Fri Sep 12 10:40:09 2014 +0200

    SQL scripts should not manage transactions

    Nova SQL scripts assume too much about the environment and the way in
    which they are executed by sqlalchemy-migrate. Particularly, they manage
    transactions on their own even though sqlalchemy-migrate do it itself,
    plus it assumes that scripts are executed in one go (even though
    standard Python DB-API 2.0 does not mention multi-statement SQL commands
    to be executed on DB cursors.

    blueprint enable-mysql-connector

    Change-Id: I10c58b3af75d3ab9153a8bbd2a539bf1577de328
    Closes-Bug: 1368391

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

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

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

Reviewed: https://review.openstack.org/191956
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=f20d5943c9310e742d976c26337fac5d07238c97
Submitter: Jenkins
Branch: master

commit f20d5943c9310e742d976c26337fac5d07238c97
Author: John Griffith <email address hidden>
Date: Mon Jun 15 14:02:28 2015 -0600

    SQL scripts should not manage transactions

    This bug was fixed a while back, but the migration added for
    multi-attach reintroduced it for its sqlite_downgrade file.

    This patch removes it.

    blueprint enable-mysql-connector

    Change-Id: Iaec8713bf5cf36bcc97afbca8dd025cda9c2238d
    Closes-Bug: 1368391

Changed in sqlalchemy-migrate:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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