Run htcacheclean to clean mirror caches

Now that we have reverse proxy caching on our mirror nodes set up
htcacheclean to run their hourly and reduce the size of the cache to
2GB. Based on using the cache lightly for a few days the max size of the
cache has been 648MB so 2GB should be plenty of headroom while still
being well under available disk on our mirror nodes.

Change-Id: I3fe41a3de669d08966357e10d4c121caa9bab6d4
This commit is contained in:
Clark Boylan 2017-04-03 11:06:31 -07:00
parent 38e561b26b
commit dbae6afeda
1 changed files with 17 additions and 0 deletions

View File

@ -267,6 +267,23 @@ class openstack_project::mirror (
]
}
# Cache cleanup
package { 'apache2-utils':
ensure => present,
}
cron { 'apache-cache-cleanup':
# Clean apache cache once an hour, keep size down to 2GB.
minute => '0',
hour => '*',
command => 'htcacheclean -n -p /opt/apache_cache -t -l 2048M > /dev/null',
environment => 'PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin',
require => [
File['/opt/apache_cache'],
Package['apache2-utils'],
],
}
class { '::httpd::logrotate':
options => [
'daily',