Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: hhvm: make the perf maps cron work under systemd
......................................................................

hhvm: make the perf maps cron work under systemd

Since we got rid of the pidfile, the cron must check the age of the
running HHVM process in another way.

Change-Id: I97f9bfe4c8fbc41535b1d495d2c95f5ba1e7c6f5
---
M modules/hhvm/manifests/init.pp
1 file changed, 5 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/14/282114/1

diff --git a/modules/hhvm/manifests/init.pp b/modules/hhvm/manifests/init.pp
index 9a6bb5a..b81abe2 100644
--- a/modules/hhvm/manifests/init.pp
+++ b/modules/hhvm/manifests/init.pp
@@ -295,10 +295,12 @@
 
     # Prune stale symbol translation maps from /tmp. These files are
     # generated by HHVM to supply `perf` with language-level context.
-
-    # TODO: this will not work under systemd-based systems
+    $procfile = $::initsystem ? {
+        'systemd' => 
'/sys/fs/cgroup/systemd/system.slice/hhvm.service/cgroup.procs',
+        default   => '/var/run/hhvm/hhvm.pid',
+    }
     cron { 'tidy_perf_maps':
-        command => '/usr/bin/find /tmp -name "perf-*" -not -cnewer 
/run/hhvm/hhvm.pid -delete > /dev/null 2>&1',
+        command => "/usr/bin/find /tmp -name \"perf-*\" -not -cnewer 
${procfile} -delete > /dev/null 2>&1",
         hour    => fqdn_rand(23, 'tidy_perf_maps'),
         minute  => 0,
     }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I97f9bfe4c8fbc41535b1d495d2c95f5ba1e7c6f5
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto <[email protected]>

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

Reply via email to