Potential resource leak in the contextmanager functions

Bug #1083045 reported by Iryoung Jeong
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Iryoung Jeong

Bug Description

The functions using decorator @contextlib.contextmanager has potential resource leaks in the files:
 - quantum/tests/unit/test_policy.py
 - quantum/tests/unit/test_db_plugin.py
 - quantum/tests/unit/test_l3_plugin.py
 - quantum/tests/unit/test_extension_security_group.py

If an unhandled exception occurs in the block, resource de-allocation would not execute correctly.

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

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

Changed in quantum:
assignee: nobody → Iryoung Jeong (iryoung)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to quantum (master)

Reviewed: https://review.openstack.org/16955
Committed: http://github.com/openstack/quantum/commit/7011f7f2a0495286f2180bae75608d800f5b0b38
Submitter: Jenkins
Branch: master

commit 7011f7f2a0495286f2180bae75608d800f5b0b38
Author: Iryoung Jeong <email address hidden>
Date: Thu Nov 22 12:58:47 2012 +0900

    Releasing resources of context manager functions if exceptions occur

    The functions using decorator @contextlib.contextmanager in files below
    has potential resorce leaks when exceptions occur.
     - quantum/tests/unit/test_policy.py
     - quantum/tests/unit/test_db_plugin.py
     - quantum/tests/unit/test_l3_plugin.py
     - quantum/tests/unit/test_extension_security_group.py

    This patch let them releasing resources correctly.

    Fixes bug #1083045

    Change-Id: I66266b7afa4977537caabafc82d8c294730188ba

Changed in quantum:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in quantum:
milestone: none → grizzly-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in quantum:
milestone: grizzly-2 → 2013.1
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.