Ottomata has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/220474

Change subject: Restart jmxtrans when purging log files
......................................................................

Restart jmxtrans when purging log files

Change-Id: Ie7084c4e3a317a76d6ccb3040a0eab6ba0d20a30
---
M manifests/init.pp
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet/jmxtrans 
refs/changes/74/220474/1

diff --git a/manifests/init.pp b/manifests/init.pp
index 0cada01..b45d05d 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -39,10 +39,10 @@
     # propertly rotate files until we have a version
     # of jmxtrans where this is fixed.  Remove all jmxtrans
     # logs for now.  We don't really need these anyway.
-    # jmxtrans will function fine if its open log
-    # file is removed.
-    exec { 'jmxtrans-log-purge':
-        command => '/bin/rm /var/log/jmxtrans/*.log*',
+    cron { 'jmxtrans-log-purge':
+        # This is so awful.  The version of jmxtrans we have now
+        # seems to not respond to 'service jmxtrans stop'.
+        command => 'pgrep -f "/usr/bin/java.+jmxtrans-all.jar" | xargs sudo 
kill; /bin/rm -r /var/log/jmxtrans/*.log*; service jmxtrans start',
         user    => 'jmxtrans',
         onlyif  => '/usr/bin/dpkg -s jmxtrans | grep -q "Version: 250"',
         require => Service['jmxtrans'],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie7084c4e3a317a76d6ccb3040a0eab6ba0d20a30
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet/jmxtrans
Gerrit-Branch: master
Gerrit-Owner: Ottomata <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to