Permalink
Browse files

Base image signature files are not images.

Stop treating base image signature files as images. Resolves bug 967843.

Change-Id: Iad2f27e07a6a9887785bb4dab44476c62cd11a69
  • Loading branch information...
1 parent 998e57b commit 38bc2d329581bf85d131e0025a13c7e87ea9f107 @mikalstill mikalstill committed Mar 28, 2012
Showing with 4 additions and 1 deletion.
  1. +1 −0 nova/tests/test_imagecache.py
  2. +3 −1 nova/virt/libvirt/imagecache.py
@@ -77,6 +77,7 @@ def test_list_base_images(self):
'e97222e91fc4241f49a7f520d1dcf446751129b3',
'17d1b00b81642842e514494a78e804e9a511637c',
'17d1b00b81642842e514494a78e804e9a511637c_5368709120',
+ '17d1b00b81642842e514494a78e804e9a511637c_5368709120.sha1',
'17d1b00b81642842e514494a78e804e9a511637c_10737418240',
'00000004']
@@ -134,7 +134,9 @@ def _list_base_images(self, base_dir):
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):

0 comments on commit 38bc2d3

Please sign in to comment.