-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch enables both pruner and cleaner cronJobs that are supposed to manage the /var/lib/glance/image-cache directory to stay under the upper limit defined by ImageCacheSize (that triggers a PVC request of that size), as well as clean the incomplete/stalled images from the related folders. In order to make the above happen, a few things are fixed by this patch: 1. 00-config.conf (the global one) is updated to include the image-cache related parameters (if cache is enabled); 2. the CronJobs creation logic has been moved to a dedicated 'ensureCronJobs' function (it's the same approach we adopted for PVC creation) and results cleaner from the glance_controller point of view; 3. The CronJob function itself mounts an additional Volume in case of cleaner/pruner: the glance-cache PVC should be mounted in /var/lib/glance/image-cache because it represents the target directory managed by the cronJob command; in case of DBPurge this additional volume is not provided 4. The 'image_cache_max_size' parameter was broken and filled with a wrong value, hence with this patch we normalize the ImageCacheSize parameter (resource.MustParse()) and pass the resulting Value() to the templateParameters that are supposed to fill the right section of the glance config file Signed-off-by: Francesco Pantano <[email protected]>
- Loading branch information
Showing
3 changed files
with
74 additions
and
13 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