nova.tests.unit.network.test_neutronv2.TestNeutronv2WithMock.test_deallocate_for_instance_uses_delete_helper fails with sqlalchemy.exc.OperationalError

Bug #1431519 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Sean Dague

Bug Description

Due to this change:

https://github.com/openstack/nova/commit/92074e0fde7da6262897b08d100fedcfe7e4940f

I'm always hitting this locally now:

http://paste.openstack.org/show/191892/

Looking at the code, I don't see how it wouldn't fail since the neutronv2 API code calls base_api.update_instance_cache_with_nw_info which eventually calls instance.save() and the nova.objects.Instance.save() method isn't mocked out, which talks to the DB API and that blows up since we don't have a database connection.

I'm not sure how this is passing in the gate, but looking at the code it's clearly wrong. There must be some test ordering issue that makes this pass.

Tags: testing
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/163931

Changed in nova:
assignee: nobody → Matt Riedemann (mriedem)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in nova:
assignee: Matt Riedemann (mriedem) → Sean Dague (sdague)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit c943cbbc40654827f537773a90d77577a54dbe0b
Author: Sean Dague <email address hidden>
Date: Thu Mar 12 16:55:55 2015 -0400

    ensure DatabaseFixture removes db on cleanup

    The DatabaseFixture was previously just ensuring that tests which used
    it had a clean database when they started. It did not ensure there was
    no working database around when it wasn't being used, so tests which
    leaked into the database might pass even if they were listed as a
    NoDBTest, because there was an in memory test db from a prior run.

    This adds a cleanup path to the fixture which blows away the db at the
    end of the test (which itself is tested). There were 46 tests which
    failed when we got this isolation correct, and this changes all those
    test classes containing those tests to require a db. Many of these
    could have narrower fixes, but this returns us to an isolated state.

    Change-Id: Id0480035d8e615ae602da9737cd2c94bc7967067
    Closes-Bug: #1431519
    Closes-Bug: #1431551

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

Change abandoned by Matt Riedemann (<email address hidden>) on branch: master
Review: https://review.openstack.org/163931
Reason: Fixed by Sean here:

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

Thierry Carrez (ttx)
Changed in nova:
milestone: none → kilo-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: kilo-3 → 2015.1.0
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.