Comment 5 for bug 1457527

Revision history for this message
Favyen Bastani (fbastani) wrote :

Also, the specific code that was added in Kilo and appears to be causing this issue is this (virt/imagecache.py):

            gb = objects.BlockDeviceMappingList.get_by_instance_uuid
            bdms = gb(context, instance.uuid)
            if bdms:
  swap = driver_block_device.convert_swap(bdms)
                if swap:
                    swap_image = 'swap_' + str(swap[0]['swap_size'])
                    used_swap_images.add(swap_image)

I believe the "bdms" was empty for all of the non-volume VMs (using the ephemeral/local root disk storage) and so the swap backing image never gets marked as used, so the image cache thinks it should be deleted.