Comment 2 for bug 1180955

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

Reviewed: https://review.openstack.org/29991
Committed: http://github.com/openstack/nova/commit/6ea7df2cbcdca6c9be0c44d2436e24549c499297
Submitter: Jenkins
Branch: master

commit 6ea7df2cbcdca6c9be0c44d2436e24549c499297
Author: Matt Riedemann <email address hidden>
Date: Tue May 21 13:33:19 2013 -0700

    Fix UnboundLocalError in powervm lvm cleanup code

    During spawn, if a local volume for the backing block device fails to
    be created, the cleanup operation for the volume can fail with a
    "UnboundLocalError: local variable 'disk_name' referenced before
    assignment" error.

    The fix is to assign to disk_name earlier and check for None before
    running cleanup.

    This patch also adds tests to cover the failure case.

    Fixes bug 1180955

    Change-Id: I0f32df1586d7bd87eccb674fec2a9597b1ce351d