ArielGlenn has submitted this change and it was merged.

Change subject: jobrunner: refactor rsyslog conf and let wikidev read log

jobrunner: refactor rsyslog conf and let wikidev read log

rsyslog creates files that are only readable by root:adm which is rather
annoying for people trying to find out why jobs are failling.

Introduce an rsyslog template to vary the log file name based on the
programname we are interested in.
Catch both 'jobrunner' and 'jobchron' programs.
Have the file to be owned by root:wikidev mode 0640 so wikidev folks can
read the logs (bug T146040).
'& ~' is magic to prevent the message to also end up in /var/log/syslog

Later we will want to send them to logstash.

Bug: T146040
Change-Id: I04955407372472cbd9b4424aebf6c30e0e00e60a
M modules/mediawiki/files/jobrunner.rsyslog.conf
1 file changed, 7 insertions(+), 3 deletions(-)

  ArielGlenn: Looks good to me, approved
  Hashar: Looks good to me, but someone else must approve
  jenkins-bot: Verified

  Giuseppe Lavagetto: There's a problem with this change, please improve

diff --git a/modules/mediawiki/files/jobrunner.rsyslog.conf 
index 62e330c..e078436 100644
--- a/modules/mediawiki/files/jobrunner.rsyslog.conf
+++ b/modules/mediawiki/files/jobrunner.rsyslog.conf
@@ -1,4 +1,8 @@
-# rsyslogd(8) configuration file for HHVM.
+# rsyslogd(8) configuration file for the jobrunner services
 # This file is managed by Puppet.
-:programname, startswith, "jobrunner" /var/log/mediawiki/jobrunner.log
-:programname, startswith, "jobchron" /var/log/mediawiki/jobchron.log
+template(name="jobservice_logfile" type="string" 
+if ($programname == 'jobrunner') or ($programname == 'jobchron') then {
+    action(type="omfile" dynaFile="jobservice_logfile" FileCreateMode="0640" 
FileOwner="root" FileGroup="wikidev")
+    & ~

To view, visit
To unsubscribe, visit

Gerrit-MessageType: merged
Gerrit-Change-Id: I04955407372472cbd9b4424aebf6c30e0e00e60a
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <>
Gerrit-Reviewer: Alex Monk <>
Gerrit-Reviewer: ArielGlenn <>
Gerrit-Reviewer: Elukey <>
Gerrit-Reviewer: Filippo Giunchedi <>
Gerrit-Reviewer: Giuseppe Lavagetto <>
Gerrit-Reviewer: Hashar <>
Gerrit-Reviewer: jenkins-bot <>

MediaWiki-commits mailing list

Reply via email to