Page MenuHomePhabricator

Switch dump snapshot hosts to use php7.2
Closed, ResolvedPublic

Description

I need to test everything in beta and then move them over. I've run adds/changes and all the xml/sql on php7.2 locally but there's the various weeklies or 'misc' ones to check too.

Event Timeline

ArielGlenn triaged this task as Medium priority.Dec 13 2018, 9:35 PM
ArielGlenn created this task.

The plan:

  • test xml/sql dumps with php7.2 on beta
  • switch snapshot1005,6,7 to php7.2 -- before Dec 20th dump run starts
  • test 'misc' dumps (adds/changes, categories daily and weekly, cirrussearch, contenttranslation, wikdata weeklies) on snapshot testbed
  • switch snapshot1008 to php7.2 -- weekend, when wikidata weeklies are not running

I tested this with testwikidatawiki on mwdebug1002, php7.2 should be fine as far as the Wikibase entity dumps are concerned (output is exactly equal to php7.0/hhvm).

I tested this with testwikidatawiki on mwdebug1002, php7.2 should be fine as far as the Wikibase entity dumps are concerned (output is exactly equal to php7.0/hhvm).

Awesome! What types was this for?

Testing on deployment-snapshot01 required the following:

  • get puppet working on the instance (broken since the update of its puppetmaster to stretch, the ca crt file from deployment-puppetmaster03 was missing on the snapshot instance)
  • change the hiera setting profile::dumps::generation::worker::common::php: /usr/bin/php7.0 to 7.2 for the instance settings (this switches the path for php in config files for the dump scripts)
  • php7.2 was already installed with (most) of its extensions because in puppet/hieradata/labs/deployment-prep/common.yaml profile::mediawiki::php::php_version s set to 7.2
  • had to manually apt-get install the packages php-memcached, php-msgpack (required for memcached ext with our build), php-geoip, php-wikidiff2, php-luasandbox since apt regarded these as downgrades due to the ~wmf in the package name

After this I was able to run xml/sql dumps with php7.2 for enwiki beta without problems so far. It's now in the flow steps which are very slow on these little instances without much memory, 45 minutes for current and another 45 or so for history. More updates tomorrow.

The xml/sql test dumps run with php7.2 look good. Conversion on snapshot1005,6,7 9 will require the following:

  • change the hiera setting profile::dumps::generation::worker::common::php: /usr/bin/php7.0 to 7.2 for those hosts (snapshot1008 conversion comes later, after testing of misc crons)
  • change the hiera setting profile::mediawiki::php::php_version to 7.2 for those hosts
  • after a puppet run, manually apt-get install php-memcached, php-msgpack, php-geoip, php-wikidiff2, php-luasandbox
  • verify that php is set up correctly via /usr/bin/php7.0 /srv/mediawiki/multiversion/MWScript.php getSlaveServer.php --wiki='wikidatawiki' --group=dump
  • check the config files in /etc/dumps/conf on one of those hosts to make sure the php version is indeed updated (just out of paranoia)
  • make a copy of the conf file, edit it to direct output to a temp location, and do a sample run of a very tiny wiki with no prefetch to make sure no pieces were overlooked
  • profit?

This should all be done while dumps are not currently running on those hosts; that means before the 20th.

I tested this with testwikidatawiki on mwdebug1002, php7.2 should be fine as far as the Wikibase entity dumps are concerned (output is exactly equal to php7.0/hhvm).

Awesome! What types was this for?

JSON and TLL-RDF dumps, for all of testwikidatawiki (including Lexemes)... this should cover everything.

I plan to switch over snapshot1005,6,7,9 on Monday sometime in the middle of the day, assuming that the wikidata xml/sql dumps have completed by then.

Change 480003 had a related patch set uploaded (by ArielGlenn; owner: ArielGlenn):
[operations/puppet@production] switch snapshot1005,6,7,9 to use php 7.2

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

Change 480003 merged by ArielGlenn:
[operations/puppet@production] switch snapshot1005,6,7,9 to use php 7.2

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

That run was done this morning so I have updated the hosts to have php7.2 installed. On those hosts, after merging and deploying the hiera change and running puppet, I did the following:

  • apt-get install php-memcached php-msgpack php-geoip php-wikidiff2 php-luasandbox php-redis php-igbinary php-apcu (more extensions needed forced upgrade)
  • puppet run (to make sure all conf files were current)
  • sudo -u www-data /usr/bin/php7.2 /srv/mediawiki/multiversion/MWScript.php getSlaveServer.php --wiki='wikidatawiki' --group=dump (to verify php7.2 is working)

Now I can switch over the dump config files to use php7.2.

Change 480007 had a related patch set uploaded (by ArielGlenn; owner: ArielGlenn):
[operations/puppet@production] switch dump scripts on snapshots 1005,6,7,9 to use php7.2

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

Change 480007 merged by ArielGlenn:
[operations/puppet@production] switch dump scripts on snapshots 1005,6,7,9 to use php7.2

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

I have verified that dumps are now using php7.2 by running the following on snapshot1005,6,7,9 as the dumpsgen user from the apropriate location in the dumps repo:

python ./worker.py --configfile /etc/dumps/confs/wikidump.conf.dumps --dryrun --job xmlflowdump mediawikiwiki

The following misc cron jobs need to be tested under php7.2:

  • dumpcirrussearch.sh
  • dumpcategoriesrdf.sh
  • dumpcategoriesrdf-daily.sh
  • dump-global-blocks.sh
  • dumpcontentxlation.sh
  • generatemiscdumps.py
  • dumpwikidatajson.sh
  • dumpwikidatardf.sh

Thanks to hoo for doing the last two.

As everything checks out, I'll be making the switch on snapshot1008 on Sunday when the wikidata weeklies have completed.

Change 481167 had a related patch set uploaded (by ArielGlenn; owner: ArielGlenn):
[operations/puppet@production] make all snapshot hosts use php7.2 for dumps

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

Change 481167 merged by ArielGlenn:
[operations/puppet@production] make all snapshot hosts use php7.2 for dumps

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

The last snapshot host is now running php7.2. I'll leave this ticket open for a few days to make sure that everything's running smoothly.

All is well, closing!