Giuseppe Lavagetto has submitted this change and it was merged. Change subject: HAT: create mediawiki::hhvm::housekeeping ......................................................................
HAT: create mediawiki::hhvm::housekeeping This is done basically to avoid the chicken-and-egg problem on newly installed servers Change-Id: I606300f8aa304a34a7a2f73492f78affb3474b22 Signed-off-by: Giuseppe Lavagetto <glavage...@wikimedia.org> --- M modules/mediawiki/manifests/hhvm.pp A modules/mediawiki/manifests/hhvm/housekeeping.pp 2 files changed, 18 insertions(+), 12 deletions(-) Approvals: Giuseppe Lavagetto: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/mediawiki/manifests/hhvm.pp b/modules/mediawiki/manifests/hhvm.pp index e1329c8..69ca841 100644 --- a/modules/mediawiki/manifests/hhvm.pp +++ b/modules/mediawiki/manifests/hhvm.pp @@ -10,7 +10,7 @@ include ::hhvm::debug include ::mediawiki::users - + include ::mediawiki::hhvm::housekeeping # Derive HHVM's thread count by dividing RAM by 120 MiB. # This works out to be 100 threads on 12 GiB servers and @@ -81,15 +81,4 @@ before => Service['hhvm'], } - - # Ensure that jemalloc heap profiling is disabled. This means that - # if you want to capture heap profiles, you have to disable Puppet. - # But this way we can be sure we're not forgetting to turn it off. - - exec { 'ensure_jemalloc_prof_deactivated': - command => '/usr/bin/curl -fs http://localhost:9002/jemalloc-prof-deactivate', - onlyif => '! /usr/bin/curl -fs http://localhost:9002/jemalloc-stats-print | grep -Pq "opt.prof(_active)?: false"', - provider => 'shell', - require => [Service['hhvm'],Service['apache2']], - } } diff --git a/modules/mediawiki/manifests/hhvm/housekeeping.pp b/modules/mediawiki/manifests/hhvm/housekeeping.pp new file mode 100644 index 0000000..2d87599 --- /dev/null +++ b/modules/mediawiki/manifests/hhvm/housekeeping.pp @@ -0,0 +1,17 @@ +# === Class mediawiki::hhvm::housekeeping +# +# This class contains all crons and other housekeeping execs we may +# want to run against hhvm or its admin port. +class mediawiki::hhvm::housekeeping { + # Ensure that jemalloc heap profiling is disabled. This means that + # if you want to capture heap profiles, you have to disable Puppet. + # But this way we can be sure we're not forgetting to turn it off. + + exec { 'ensure_jemalloc_prof_deactivated': + command => '/usr/bin/curl -fs http://localhost:9002/jemalloc-prof-deactivate', + onlyif => '! /usr/bin/curl -fs http://localhost:9002/jemalloc-stats-print | grep -Pq "opt.prof(_active)?: false"', + provider => 'shell', + require => [Service['hhvm'],Service['apache2']], + } + +} -- To view, visit https://gerrit.wikimedia.org/r/174926 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I606300f8aa304a34a7a2f73492f78affb3474b22 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto <glavage...@wikimedia.org> Gerrit-Reviewer: Giuseppe Lavagetto <glavage...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits