From 83f0d59191dc2afe9cbfbb8bf255edd4134446a7 Mon Sep 17 00:00:00 2001 From: Ian Cordasco Date: Wed, 22 Apr 2015 10:25:38 -0500 Subject: [PATCH] Run the glance cache cron jobs more frequently Currently, running every 24 hours is long enough to allow the cache to completely fill up the container's disk. By running the jobs every 6 hours instead (4 times per day), we hope to eliminate the problem where the container will fill up. Closes-bug: 1439892 Change-Id: Ie7311f70656447382c2403e79453fe88401efca1 --- playbooks/roles/os_glance/tasks/glance_post_install.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/roles/os_glance/tasks/glance_post_install.yml b/playbooks/roles/os_glance/tasks/glance_post_install.yml index 98f0f3edab..afc350d83e 100644 --- a/playbooks/roles/os_glance/tasks/glance_post_install.yml +++ b/playbooks/roles/os_glance/tasks/glance_post_install.yml @@ -16,7 +16,7 @@ - name: Create glance cache management cron jobs cron: name: "{{ item.name }}" - minute: "{{ 59 |random }}" + minute: "{{ 59 |random(start=1) }}" day: "*" hour: "{{ item.hour }}" month: "*" @@ -27,7 +27,7 @@ - name: /usr/local/bin/glance-cache-pruner hour: "*" - name: /usr/local/bin/glance-cache-cleaner - hour: "{{ 23|random }}" + hour: "*/5" when: glance_flavor | search("cache") tags: - glance-cron