Tempdirs left behind after test run on python 2.7

Bug #1047530 reported by Vish Ishaya
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Vish Ishaya

Bug Description

On some versions of python 2.7 a bunch of tempdirs are left in /tmp. This seems to be due to a scoping issue where we are setting the value of a variable in an inline method without using the nonlocal keyword.

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

This is causing issues in our gating test infrastructure, so marking it high priority

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

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

Reviewed: https://review.openstack.org/12586
Committed: http://github.com/openstack/nova/commit/67f74991f73fa2c8350c434a7f67c85bf50e4934
Submitter: Jenkins
Branch: master

commit 67f74991f73fa2c8350c434a7f67c85bf50e4934
Author: Vishvananda Ishaya <email address hidden>
Date: Fri Sep 7 17:17:00 2012 +0000

    Stop lock decorator from leaving tempdirs in tests

    In some versions of python 2.7, we must use the nonlocal keyword to
    give an inline function access to a variable in the enclosing scope.
    This leads to a tempdir not beaing cleaned up because a boolean in
    the synchronized decorator doesn't get set properly. Since we are
    still supporting python 2.6, this patch removes the method call
    completely so we don't have to worry about locality.

    The patch also moves acquiring the lock inside the try, except to
    make sure the tempdir is still cleaned even if there is some issue
    with getting the lock.

    Fixes bug 1047530

    Change-Id: Ie3da18262e67de076b1e474c24edd2e4e5208646

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: folsom-rc1 → 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.