Instances directory gets deleted during unit test suite run

Bug #974293 reported by Unmesh Gurjar
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Vish Ishaya
Essex
Fix Released
High
Vish Ishaya

Bug Description

Scenario:
I have a running instance in my devstack environment (using master branch). Then I ran the unit test suite and the Nova instances directory got deleted.

My instances directory is '/opt/stack/nova/instances' and all instances are lost.

The periodic task 'update_available_resource' fails with the following stack trace/nova-compute console log in the below link: http://paste.openstack.org/show/12456/

description: updated
Revision history for this message
Unmesh Gurjar (unmesh-gurjar) wrote :

Seems that the issue occurs due to the tearDown( ) method in test_libvirt:LibvirtConnectionTestCase.

https://github.com/openstack/nova/blob/master/nova/tests/test_libvirt.py#L2314

Here is the tearDown code snippet:

    def tearDown(self):
        super(LibvirtConnectionTestCase, self).tearDown()

        try:
            shutil.rmtree(flags.FLAGS.instances_path)
        except Exception:
            pass

Revision history for this message
Vish Ishaya (vishvananda) wrote :

Ouch that is nasty. We should be setting instances_path to a tempdir in setup.

Changed in nova:
importance: Undecided → High
status: New → In Progress
assignee: nobody → Vish Ishaya (vishvananda)
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/6313

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

Fix proposed to branch: stable/essex
Review: https://review.openstack.org/6314

Revision history for this message
Thierry Carrez (ttx) wrote :

Hmm, This has been around for two months and it didn't kill any kitten before yesterday ? Strange.

no longer affects: nova/essex
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/6313
Committed: http://github.com/openstack/nova/commit/0d03119e2059e50105b3045eb019940c860489c1
Submitter: Jenkins
Branch: master

commit 0d03119e2059e50105b3045eb019940c860489c1
Author: Vishvananda Ishaya <email address hidden>
Date: Thu Apr 5 17:00:25 2012 -0700

    Stop libvirt test from deleting instances dir

     * fixes bug 974293

    Change-Id: Id41ab20193a70246ad2e3e1cc18edf47059d312d

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

Reviewed: https://review.openstack.org/6314
Committed: http://github.com/openstack/nova/commit/4acfab6a7b368d34295afdace678563e1c3fa058
Submitter: Jenkins
Branch: stable/essex

commit 4acfab6a7b368d34295afdace678563e1c3fa058
Author: Vishvananda Ishaya <email address hidden>
Date: Thu Apr 5 17:00:25 2012 -0700

    Stop libvirt test from deleting instances dir

     * fixes bug 974293

    Change-Id: Id41ab20193a70246ad2e3e1cc18edf47059d312d

tags: added: in-stable-essex
Devin Carlen (devcamcar)
Changed in nova:
milestone: none → folsom-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: folsom-1 → 2012.2
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.