diff options
| author | Pádraig Brady <pbrady@redhat.com> | 2013-02-14 10:37:21 +0000 |
|---|---|---|
| committer | Pádraig Brady <pbrady@redhat.com> | 2013-02-17 05:02:32 +0000 |
| commit | 1501a4e4f75efb63385a1dadc728c2ef245bf7de (patch) | |
| tree | 7f91f991e11096e0cb9c1f37e714ae92eaaf91d8 /nova/virt | |
| parent | d49d504d23ebb6ae7d12e6aba37f66e7c3839ecf (diff) | |
| download | nova-1501a4e4f75efb63385a1dadc728c2ef245bf7de.tar.gz nova-1501a4e4f75efb63385a1dadc728c2ef245bf7de.tar.xz nova-1501a4e4f75efb63385a1dadc728c2ef245bf7de.zip | |
remove intermediate libvirt downloaded images
* nova/virt/images.py (fetch_to_raw): When converting a downloaded
image to raw, ensure we delete the original download image.
I.E. the .part file. The regression was introduced in 7c265343.
* nova/tests/test_libvirt.py (test_fetch_raw_image): A new test
for this function which wasn't tested previously.
Fixes bug: 1125068
Change-Id: Ie6f2cff1a554b8500fd66f0832566ae1b317be40
Diffstat (limited to 'nova/virt')
| -rwxr-xr-x | nova/virt/images.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/virt/images.py b/nova/virt/images.py index a5c960486..b5ca8fa47 100755 --- a/nova/virt/images.py +++ b/nova/virt/images.py @@ -225,6 +225,7 @@ def fetch_to_raw(context, image_href, path, user_id, project_id): LOG.debug("%s was %s, converting to raw" % (image_href, fmt)) with utils.remove_path_on_error(staged): convert_image(path_tmp, staged, 'raw') + os.unlink(path_tmp) data = qemu_img_info(staged) if data.file_format != "raw": @@ -233,6 +234,5 @@ def fetch_to_raw(context, image_href, path, user_id, project_id): data.file_format) os.rename(staged, path) - else: os.rename(path_tmp, path) |
