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.
Also, the specific code that was added in Kilo and appears to be causing this issue is this (virt/imagecach e.py):
gb = objects. BlockDeviceMapp ingList. get_by_ instance_ uuid block_device. convert_ swap(bdms)
swap_ image = 'swap_' + str(swap[ 0]['swap_ size'])
used_ swap_images. add(swap_ image)
bdms = gb(context, instance.uuid)
if bdms:
swap = driver_
if swap:
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.