From f2d5869d8c83cf420fc29cecbefc42d2d2f65839 Mon Sep 17 00:00:00 2001 From: Michael Still Date: Thu, 8 Nov 2012 12:12:30 +1100 Subject: Yield in between hash runs for the image cache manager. This should stop the cache manager from locking up nova-compute for long periods of time. Change-Id: Icc510a55282b479b3ba673ac68aee793da1714fb --- nova/virt/libvirt/imagecache.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nova/virt/libvirt/imagecache.py b/nova/virt/libvirt/imagecache.py index 721587512..efc57eea5 100644 --- a/nova/virt/libvirt/imagecache.py +++ b/nova/virt/libvirt/imagecache.py @@ -313,6 +313,9 @@ class ImageCacheManager(object): if not checksum_result is None: image_bad = not checksum_result + # Give other threads a chance to run + time.sleep(0) + instances = [] if img_id in self.used_images: local, remote, instances = self.used_images[img_id] -- cgit