ArielGlenn has submitted this change and it was merged.

Change subject: jobrunner: log rotate jobchron.log
......................................................................


jobrunner: log rotate jobchron.log

Make it restart the jobchron service.

Bug: T96132
Change-Id: Ie4f2ee2507c157e2d756d8eb738908be0f3f40b9
---
A modules/mediawiki/files/logrotate.d_mediawiki_jobchron
M modules/mediawiki/manifests/jobrunner.pp
2 files changed, 26 insertions(+), 1 deletion(-)

Approvals:
  ArielGlenn: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/mediawiki/files/logrotate.d_mediawiki_jobchron 
b/modules/mediawiki/files/logrotate.d_mediawiki_jobchron
new file mode 100644
index 0000000..9a2c537
--- /dev/null
+++ b/modules/mediawiki/files/logrotate.d_mediawiki_jobchron
@@ -0,0 +1,15 @@
+# logrotate config for MediaWiki Jobrunner logs
+# This file is managed by Puppet
+/var/log/mediawiki/jobchron.log
+{
+    daily
+    missingok
+    rotate 7
+    compress
+    delaycompress
+    notifempty
+    nocreate
+    postrotate
+        /usr/sbin/service jobchron restart > /dev/null 2>&1
+    endscript
+}
diff --git a/modules/mediawiki/manifests/jobrunner.pp 
b/modules/mediawiki/manifests/jobrunner.pp
index 86d6540..2d79601 100644
--- a/modules/mediawiki/manifests/jobrunner.pp
+++ b/modules/mediawiki/manifests/jobrunner.pp
@@ -68,10 +68,20 @@
         rsyslog::conf { 'jobrunner':
             source   => 'puppet:///modules/mediawiki/jobrunner.rsyslog.conf',
             priority => 20,
-            require  => File['/etc/logrotate.d/mediawiki_jobrunner'],
+            require  => [
+              File['/etc/logrotate.d/mediawiki_jobrunner'],
+              File['/etc/logrotate.d/mediawiki_jobchron'],
+            ],
         }
     }
 
+    file { '/etc/logrotate.d/mediawiki_jobchron':
+        source => 'puppet:///modules/mediawiki/logrotate.d_mediawiki_jobchron',
+        owner  => 'root',
+        group  => 'root',
+        mode   => '0444',
+    }
+
     file { '/etc/logrotate.d/mediawiki_jobrunner':
         source => 
'puppet:///modules/mediawiki/logrotate.d_mediawiki_jobrunner',
         owner  => 'root',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie4f2ee2507c157e2d756d8eb738908be0f3f40b9
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <has...@free.fr>
Gerrit-Reviewer: Alex Monk <a...@wikimedia.org>
Gerrit-Reviewer: ArielGlenn <ar...@wikimedia.org>
Gerrit-Reviewer: Filippo Giunchedi <fgiunch...@wikimedia.org>
Gerrit-Reviewer: Matanya <mata...@foss.co.il>
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