Dzahn has submitted this change and it was merged.

Change subject: phab: add cron to clean up old tmp files
......................................................................


phab: add cron to clean up old tmp files

iridium, the phabricator server, almost ran out of disk
because some tmp files never get deleted.

We manually deleted older ones and this is a cron to
automate that.

Delete files in /tmp, owned by 'www-data' that are older
than 14 days, each day at 7.

Bug: T150396
Change-Id: Ic6be03a3f7b5b836f2242577e0fb6e59564579f7
---
M modules/phabricator/manifests/tools.pp
1 file changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/modules/phabricator/manifests/tools.pp 
b/modules/phabricator/manifests/tools.pp
index 085507b..8bfb4f6 100644
--- a/modules/phabricator/manifests/tools.pp
+++ b/modules/phabricator/manifests/tools.pp
@@ -73,4 +73,12 @@
         hour    => '1',
         require => Package[$deploy_target],
     }
+
+    # clean up old tmp files (T150396)
+    cron { 'phab_clean_tmp':
+        ensure  => present,
+        command => '/usr/bin/find /tmp -user www-data -mtime +14 | xargs rm 
-rf',
+        user    => 'www-data',
+        hour    => '7',
+    }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic6be03a3f7b5b836f2242577e0fb6e59564579f7
Gerrit-PatchSet: 8
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn <dz...@wikimedia.org>
Gerrit-Reviewer: 20after4 <mmod...@wikimedia.org>
Gerrit-Reviewer: Dzahn <dz...@wikimedia.org>
Gerrit-Reviewer: Filippo Giunchedi <fgiunch...@wikimedia.org>
Gerrit-Reviewer: Krinkle <krinklem...@gmail.com>
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