Skip to content

Commit

Permalink
Base image signature files are not images.
Browse files Browse the repository at this point in the history
Stop treating base image signature files as images. Resolves bug 967843.

Change-Id: Iad2f27e07a6a9887785bb4dab44476c62cd11a69
  • Loading branch information
mikalstill committed Mar 28, 2012
1 parent 998e57b commit 38bc2d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions nova/tests/test_imagecache.py
Expand Up @@ -77,6 +77,7 @@ def test_list_base_images(self):
'e97222e91fc4241f49a7f520d1dcf446751129b3',
'17d1b00b81642842e514494a78e804e9a511637c',
'17d1b00b81642842e514494a78e804e9a511637c_5368709120',
'17d1b00b81642842e514494a78e804e9a511637c_5368709120.sha1',
'17d1b00b81642842e514494a78e804e9a511637c_10737418240',
'00000004']

Expand Down
4 changes: 3 additions & 1 deletion nova/virt/libvirt/imagecache.py
Expand Up @@ -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):
Expand Down

0 comments on commit 38bc2d3

Please sign in to comment.