Gehel has submitted this change and it was merged. Change subject: Build cirrus completion indices daily ......................................................................
Build cirrus completion indices daily We have made some optimizations to the index building process, bringing runtime down from over 12 hours to under 5 hours. This should be low enough we can afford to rebuild these indices on a daily basis. Increased replicationTimeout from 1h to 1h30, during rolling restarts time to replicate shards can be longer than usual. Change-Id: I5d3ed3aada0fe05ce36e11d65c27b36c19076bbd --- M modules/mediawiki/manifests/maintenance/cirrussearch.pp 1 file changed, 12 insertions(+), 19 deletions(-) Approvals: Gehel: Looks good to me, approved DCausse: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/modules/mediawiki/manifests/maintenance/cirrussearch.pp b/modules/mediawiki/manifests/maintenance/cirrussearch.pp index 0e88308..cb898d8 100644 --- a/modules/mediawiki/manifests/maintenance/cirrussearch.pp +++ b/modules/mediawiki/manifests/maintenance/cirrussearch.pp @@ -1,27 +1,23 @@ class mediawiki::maintenance::cirrussearch( $ensure = present ) { require mediawiki::users - # Rebuilds the completion suggester indices once a week. This is scheduled - # to run during the low period of cirrus usage, which is generally 12am + # Rebuilds the completion suggester indices daily. This is scheduled + # to run during the low period of cirrus usage, which is generally 3am # to 7am UTC. The `|| true` statement ensures one failing wiki doesn't - # fail the entire job. This job, as of dec 2015, takes around 12 hours to + # fail the entire job. This job, as of mar 2015, takes around 5 hours # to run. - cron { 'cirrus_build_completion_indices_eqiad': + Cron { ensure => $ensure, user => $::mediawiki::users::web, - minute => 20, - hour => 0, - weekday => 2, - command => '/usr/local/bin/expanddblist all | xargs -I{} -P 4 sh -c \'/usr/local/bin/mwscript extensions/CirrusSearch/maintenance/updateSuggesterIndex.php --wiki={} --masterTimeout=10m --cluster=eqiad --optimize > /var/log/mediawiki/cirrus-suggest/{}.eqiad.log 2>&1 || true\'' + minute => 30, + hour => 2, } - cron { 'cirrus_build_completion_indices_codfw': - ensure => $ensure, - user => $::mediawiki::users::web, - minute => 20, - hour => 0, - weekday => 2, - command => '/usr/local/bin/expanddblist all | xargs -I{} -P 4 sh -c \'/usr/local/bin/mwscript extensions/CirrusSearch/maintenance/updateSuggesterIndex.php --wiki={} --masterTimeout=10m --cluster=codfw --optimize > /var/log/mediawiki/cirrus-suggest/{}.codfw.log 2>&1 || true\'' + cron { + 'cirrus_build_completion_indices_eqiad': + command => '/usr/local/bin/expanddblist all | xargs -I{} -P 4 sh -c \'/usr/local/bin/mwscript extensions/CirrusSearch/maintenance/updateSuggesterIndex.php --wiki={} --masterTimeout=10m --replicationTimeout=5400 --cluster=eqiad --optimize > /var/log/mediawiki/cirrus-suggest/{}.eqiad.log 2>&1 || true\''; + 'cirrus_build_completion_indices_codfw': + command => '/usr/local/bin/expanddblist all | xargs -I{} -P 4 sh -c \'/usr/local/bin/mwscript extensions/CirrusSearch/maintenance/updateSuggesterIndex.php --wiki={} --masterTimeout=10m --replicationTimeout=5400 --cluster=codfw --optimize > /var/log/mediawiki/cirrus-suggest/{}.codfw.log 2>&1 || true\'' } file { '/var/log/mediawiki/cirrus-suggest': @@ -31,11 +27,8 @@ mode => '0775' } - file { '/etc/logrotate.d/cirrus-suggest': + logrotate::conf { 'cirrus-suggest': ensure => $ensure, source => 'puppet:///modules/mediawiki/maintenance/logrotate.d_cirrus-suggest', - owner => 'root', - group => 'root', - mode => '0444', } } -- To view, visit https://gerrit.wikimedia.org/r/275749 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5d3ed3aada0fe05ce36e11d65c27b36c19076bbd Gerrit-PatchSet: 7 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: EBernhardson <ebernhard...@wikimedia.org> Gerrit-Reviewer: Alex Monk <kren...@gmail.com> Gerrit-Reviewer: DCausse <dcau...@wikimedia.org> Gerrit-Reviewer: EBernhardson <ebernhard...@wikimedia.org> Gerrit-Reviewer: Gehel <gleder...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits