diff options
author | Matt Riedemann <mriedem@us.ibm.com> | 2013-05-21 13:33:19 -0700 |
---|---|---|
committer | Matt Riedemann <mriedem@us.ibm.com> | 2013-05-23 06:27:33 -0700 |
commit | 6ea7df2cbcdca6c9be0c44d2436e24549c499297 (patch) | |
tree | ed8c5a5f2e623d7fe032c9ea95c482c24ab129c2 /nova/utils.py | |
parent | 047cd03ee124a5c059f79776b8b8b358410584e1 (diff) | |
download | nova-6ea7df2cbcdca6c9be0c44d2436e24549c499297.tar.gz nova-6ea7df2cbcdca6c9be0c44d2436e24549c499297.tar.xz nova-6ea7df2cbcdca6c9be0c44d2436e24549c499297.zip |
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
Diffstat (limited to 'nova/utils.py')
0 files changed, 0 insertions, 0 deletions