Dzahn has submitted this change and it was merged.

Change subject: Gerrit: Use -name "*.gz" in log rotation cron
......................................................................


Gerrit: Use -name "*.gz" in log rotation cron

If there are no gzipped logs (fresh server, cleared them), then
this cron can fail when the path to `find` doesn't exist

Change-Id: I194f280b31b55ca0f9d803e1aab81dee8c9095d9
---
M modules/gerrit/manifests/crons.pp
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Paladox: Looks good to me, but someone else must approve
  Dzahn: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/gerrit/manifests/crons.pp 
b/modules/gerrit/manifests/crons.pp
index d1409fa..8b5d7d2 100644
--- a/modules/gerrit/manifests/crons.pp
+++ b/modules/gerrit/manifests/crons.pp
@@ -26,7 +26,7 @@
     cron { 'clear_gerrit_logs':
     # Gerrit rotates their own logs, but doesn't clean them out
     # Delete logs older than a week
-        command => 'find /var/lib/gerrit2/review_site/logs/*.gz -mtime +7 
-exec rm {} \\;',
+        command => 'find /var/lib/gerrit2/review_site/logs/ -name "*.gz" 
-mtime +7 -exec rm {} \\;',
         user    => 'root',
         hour    => 1
     }

-- 
To view, visit https://gerrit.wikimedia.org/r/315849
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I194f280b31b55ca0f9d803e1aab81dee8c9095d9
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chad <ch...@wikimedia.org>
Gerrit-Reviewer: Chad <ch...@wikimedia.org>
Gerrit-Reviewer: Dzahn <dz...@wikimedia.org>
Gerrit-Reviewer: Hashar <has...@free.fr>
Gerrit-Reviewer: Paladox <thomasmulhall...@yahoo.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to