summaryrefslogtreecommitdiffstats
path: root/nova/utils.py
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2013-02-23 15:24:20 +0000
committerMark McLoughlin <markmc@redhat.com>2013-02-23 16:18:47 +0000
commit38997fc916904e47dcb847e1737eb26cbd38f6e1 (patch)
tree3fe6c78b291d15d1fd4b658acae58a95a12b5524 /nova/utils.py
parenta42845e455c74f41852babbbd09a3514021ea71d (diff)
downloadnova-38997fc916904e47dcb847e1737eb26cbd38f6e1.tar.gz
nova-38997fc916904e47dcb847e1737eb26cbd38f6e1.tar.xz
nova-38997fc916904e47dcb847e1737eb26cbd38f6e1.zip
Clean unused kernels and ramdisks from image cache
Fixes bug #1132138 Only unused disk images are currently cleaned up by the image cache manager but it seems logical to clean up unused kernels and ramdisks too. Achieve that by writing kernels and ramdisks to disk using the sha1 sum of their ID as the filename. This is the same scheme as used for disk image filenames and causes the image cache manager to consider them for cleanup. We also make the cache manager take note of in use kernels and ramdisks when iterating over the list of instances. A nasty upgrade concern is that if we immediately switch to writing kernels to disk using this scheme then, where shared storage is used, we can have older image cache managers on remote compute nodes cleaning up kernels because they appear unused. To mitigate that, turn off this behaviour by default and allow it to be enabled using a new config option. This option will be removed in future and the behaviour enabled by default. DocImpact: new remove_unused_kernels option Change-Id: I56bba9fa6596601104498e262c2e657f0eae2fa0
Diffstat (limited to 'nova/utils.py')
0 files changed, 0 insertions, 0 deletions