diff --git a/modules/openstack_project/files/log_archive_maintenance.sh b/modules/openstack_project/files/log_archive_maintenance.sh index 3824651544..143e5c8e6f 100644 --- a/modules/openstack_project/files/log_archive_maintenance.sh +++ b/modules/openstack_project/files/log_archive_maintenance.sh @@ -1,7 +1,7 @@ #!/bin/sh sleep $((RANDOM%600)) && \ flock -n /var/run/gziplogs.lock \ -find /srv/static/logs/ -depth \ +find -O3 /srv/static/logs/ -depth \ \( \ \( -type f -mmin +10 -not -name robots.txt \ -not -wholename /srv/static/logs/help/\* \ @@ -12,7 +12,7 @@ find /srv/static/logs/ -depth \ -o \( -type d -not -name lost+found -empty -mtime +1 \ -execdir rmdir {} \; \) \ \) -find /srv/static/docs-draft/ -depth \ +find -O3 /srv/static/docs-draft/ -depth \ \( \ \( -type f -mtime +30 -name \*.gz -execdir rm \{\} \; \) \ -o \( -type d -not -name lost+found -empty -mtime +1 \ diff --git a/modules/openstack_project/manifests/static.pp b/modules/openstack_project/manifests/static.pp index ea54c4173c..018e0e57fd 100644 --- a/modules/openstack_project/manifests/static.pp +++ b/modules/openstack_project/manifests/static.pp @@ -135,7 +135,8 @@ class openstack_project::static ( cron { 'gziprmlogs': user => 'root', minute => '0', - hour => '*/6', + hour => '7', + weekday => '6', command => 'bash /usr/local/sbin/log_archive_maintenance.sh', environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin', require => File['/usr/local/sbin/log_archive_maintenance.sh'],