Page MenuHomePhabricator

Separate Wikitech cronjobs from production
Closed, ResolvedPublic

Event Timeline

cron jobs running as 'www-data' on wikitech (labweb1001/1002) are only 2:

# Puppet Name: run-jobs
* * * * * /usr/local/bin/mwscript maintenance/runJobs.php --wiki=labswiki > /dev/null 2>&1
# Puppet Name: tor_exit_node_update
*/20 * * * * /usr/local/bin/mwscript extensions/TorBlock/maintenance/loadExitNodes.php --wiki=labswiki --force > /dev/null

On mwmaint1002 there are MANY more than that. Like all the variations using refreshLinks.php and more.

The ones in root's crontab are all global things like wmf-auto-restart and not using PHP as far as i see.

labweb1001/1002 are on PHP 7, but it's 7.0 instead of 7.2

Regarding the TorBlock job, i tried to switch that in the past and it worked fine in production but failed on labweb, so it was reverted.

https://gerrit.wikimedia.org/r/c/operations/puppet/+/498928

So this is exatly the one to check.

The TorBlock job is already separated between wikitech and mwmaint. For mwmaint we are using profile::mediawiki::periodic_job { 'mediawiki_tor_exit_node': and for wikitech we are using cron { 'tor_exit_node_update': in another class.

I confirmed it works with both 7.0 and 7.2.

mwmaint1002:  sudo -u www-data PHP=php7.2 /usr/local/bin/mw-cli-wrapper /usr/local/bin/mwscript extensions/TorBlock/maintenance/loadExitNodes.php --wiki=aawiki --force
Successfully loaded 1160 exit nodes.

labweb1001:  sudo -u www-data PHP=php7.0 /usr/local/bin/mwscript extensions/TorBlock/maintenance/loadExitNodes.php --wiki=labswiki --force
Successfully loaded 1160 exit nodes.

The difference is just the wiki it runs on. So wikitech could also upgrade to 7.2 and the separating part is already done for this.

The remaining job "runJobs.php" exists only on labweb but not on mwmaint and is only puppetized in the openstack web class.

In short.. i think this is already done. @jijiki @Joe

jbond triaged this task as Medium priority.May 10 2019, 10:35 AM
Krinkle subscribed.

Appears to be resolved. Re-open if I misunderstood :)