Don't try to compress patterns ignored by gzip.
* modules/openstack_project/files/log_archive_maintenance.sh: According to the gzip manpage, there are a variety of filename endings it will consider to indicate a file is already compressed and will then refuse to compress. Some tempfiles get randomly-generated names which match these endings, causing the compression cron job to emit errors. Instead we make the script skip over them. Change-Id: Ib78a19362eaa54c43f44a9e6bd0c265dddee92be Reviewed-on: https://review.openstack.org/34419 Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Approved: James E. Blair <corvus@inaugust.com> Reviewed-by: James E. Blair <corvus@inaugust.com> Tested-by: Jenkins
This commit is contained in:
parent
a590e41d90
commit
d241c0575c
@ -3,8 +3,9 @@ sleep $((RANDOM%600)) && \
|
||||
flock -n /var/run/gziplogs.lock \
|
||||
find /srv/static/logs/ -depth \
|
||||
\( \
|
||||
\( -type f -not -name robots.txt -not -name \*.gz \
|
||||
\( -type f -not -name robots.txt \
|
||||
-not -wholename /srv/static/logs/help/\* \
|
||||
-not -name \*\[.-\]gz -not -name \*\[._-\]\[zZ\] \
|
||||
\( -name \*.txt -or -name \*.html -or -name tmp\* \) \
|
||||
-exec gzip \{\} \; \) \
|
||||
-o \( -type f -mtime +183 -name \*.gz -execdir rm \{\} \; \) \
|
||||
|
Loading…
Reference in New Issue
Block a user