summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorMichael Still <mikal@stillhq.com>2012-03-28 15:00:45 +1100
committerMichael Still <mikal@stillhq.com>2012-03-29 09:49:01 +1100
commit38bc2d329581bf85d131e0025a13c7e87ea9f107 (patch)
tree51c60f26bbfcab6191126f2aa50f8794814df849 /nova
parent998e57b29629946a9da96db3aed013ab895dc482 (diff)
Base image signature files are not images.
Stop treating base image signature files as images. Resolves bug 967843. Change-Id: Iad2f27e07a6a9887785bb4dab44476c62cd11a69
Diffstat (limited to 'nova')
-rw-r--r--nova/tests/test_imagecache.py1
-rw-r--r--nova/virt/libvirt/imagecache.py4
2 files changed, 4 insertions, 1 deletions
diff --git a/nova/tests/test_imagecache.py b/nova/tests/test_imagecache.py
index 09f5f9fce..373f8478b 100644
--- a/nova/tests/test_imagecache.py
+++ b/nova/tests/test_imagecache.py
@@ -77,6 +77,7 @@ class ImageCacheManagerTestCase(test.TestCase):
'e97222e91fc4241f49a7f520d1dcf446751129b3',
'17d1b00b81642842e514494a78e804e9a511637c',
'17d1b00b81642842e514494a78e804e9a511637c_5368709120',
+ '17d1b00b81642842e514494a78e804e9a511637c_5368709120.sha1',
'17d1b00b81642842e514494a78e804e9a511637c_10737418240',
'00000004']
diff --git a/nova/virt/libvirt/imagecache.py b/nova/virt/libvirt/imagecache.py
index 07bab5cd3..092ab1d05 100644
--- a/nova/virt/libvirt/imagecache.py
+++ b/nova/virt/libvirt/imagecache.py
@@ -134,7 +134,9 @@ class ImageCacheManager(object):
if len(ent) == digest_size:
self._store_image(base_dir, ent, original=True)
- elif len(ent) > digest_size + 2 and ent[digest_size] == '_':
+ elif (len(ent) > digest_size + 2 and
+ ent[digest_size] == '_' and
+ not ent.endswith('.sha1')):
self._store_image(base_dir, ent, original=False)
def _list_running_instances(self, context):