diff options
author | Pádraig Brady <pbrady@redhat.com> | 2012-03-16 03:43:49 +0000 |
---|---|---|
committer | Pádraig Brady <pbrady@redhat.com> | 2012-03-24 02:51:38 +0000 |
commit | 7c265343159bb76e0322f150f8d194ecd342b637 (patch) | |
tree | 838f6b39db0d6bbab47ed761e9a394511b354e4f /nova/context.py | |
parent | 12992e7e189388fa033fc001877292b16160f785 (diff) | |
download | nova-7c265343159bb76e0322f150f8d194ecd342b637.tar.gz nova-7c265343159bb76e0322f150f8d194ecd342b637.tar.xz nova-7c265343159bb76e0322f150f8d194ecd342b637.zip |
ensure atomic manipulation of libvirt disk images
This pattern could probably be used elsewhere,
but only libvirt disk images are considered for now.
This change ensures there are no stale files left
anywhere in the path from glance, through the libvirt image cache.
These could cause subsequent operational errors either
directly or indirectly through disk wastage.
* nova/utils.py: Add a new remove_path_on_error() context manager
that is used to remove the passed PATH on a raised exception.
* nova/virt/images.py: Ensure temporary downloaded and
converted images are protected.
* nova/virt/libvirt/connection.py: Ensure all the images in
the image cache and instance dirs are protected.
Change-Id: I81a5407665a6998128c0dee41387ef00ebddeb4d
Diffstat (limited to 'nova/context.py')
0 files changed, 0 insertions, 0 deletions