Unused kernels and ramdisks not removed by libvirt image cache manager
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
High
|
Mark McLoughlin |
Bug Description
When the image cache manager runs, it only cleans up unused base disk images ... not kernels and ramdisks
This is clearly the understood behaviour of the code:
def _list_base_
"""Return a list of the images present in _base.
Determine what images we have on disk. There will be other files in
this directory (for example kernels) so we only grab the ones which
are the right length to be disk images.
...
"""
digest_size = hashlib.
for ent in os.listdir(
if len(ent) == digest_size:
and it's only the base disk images which are stored using their sha1 sum as their filename:
if disk_images[
fname = disk_images[
if disk_images[
root_fname = hashlib.
...
if 'disk' in disk_mapping:
Assuming I'm not missing something and it does make sense to clean these up, I guess we can:
1) start storing kernels and ramdisks using their sha1 sum as their filename or
2) have the image cache manager somehow recognize the kernel/ramdisk filenames as images to examine
We also need the image cache manager to track kernels and ramdisks as used images when listing instances
i.e. need to include kernel_id and ramdisk_id here:
local, remote, insts = self.used_
Changed in nova: | |
milestone: | none → grizzly-rc1 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | grizzly-rc1 → 2013.1 |
Fix proposed to branch: master /review. openstack. org/22777
Review: https:/