Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
3 changed files
with
71 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters