Page MenuHomePhabricator

mwscript on jessie mediawiki fails
Closed, ResolvedPublic

Description

Ran into this problem when building a new deployment server on jessie.

Various update tasks (beta-update-database, beta-scap-eqiad) have so far required:

  • php5-memcached
  • php5-redis
  • php5-mysql

This problem is solved on all ubuntu hosts via: https://github.com/wikimedia/operations-puppet/blob/production/modules/mediawiki/manifests/packages.pp#L6-L10

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 21 2016, 3:24 PM
thcipriani renamed this task from mwscript on jessie mediawiki fails; requires php5-memcached and php5-redis to mwscript on jessie mediawiki fails.Sep 21 2016, 3:31 PM
thcipriani updated the task description. (Show Details)

https://integration.wikimedia.org/ci/job/beta-update-databases-eqiad/11504/ fails due to Flow eventually invoking curl_multi_init()

Looks like we need php5-curl and maybe mediawiki::packages::legacy to be included on deployment servers.

Change 313305 had a related patch set uploaded (by Hashar):
Bring back Zend PHP on deployment server

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

For some reason the Zend packages are no more installed on Jessie, though we actually need them at least for mwscript but maybe I am confused.

Regardless on deployment-tin, adding mediawiki::packages::php5 yields:

Notice: /Stage[main]/Mediawiki::Packages::Php5/Package[php5-mysql]/ensure: ensure changed 'purged' to 'present'
Notice: /Stage[main]/Mediawiki::Packages::Php5/Package[php5-geoip]/ensure: ensure changed 'purged' to 'present'
Notice: /Stage[main]/Mediawiki::Packages::Php5/Package[php5-xmlrpc]/ensure: ensure changed 'purged' to 'present'
Notice: /Stage[main]/Mediawiki::Packages::Php5/Package[php5-dbg]/ensure: ensure changed 'purged' to 'present'
Notice: /Stage[main]/Mediawiki::Packages::Php5/Package[php5-memcached]/ensure: ensure changed 'purged' to 'present'
Notice: /Stage[main]/Mediawiki::Packages::Php5/Package[php-wikidiff2]/ensure: ensure changed 'purged' to 'present'
Notice: /Stage[main]/Mediawiki::Packages::Php5/Package[php5-curl]/ensure: ensure changed 'purged' to 'present'
Notice: /Stage[main]/Mediawiki::Packages::Php5/Package[php-luasandbox]/ensure: ensure changed 'purged' to 'present'
Notice: /Stage[main]/Mediawiki::Packages::Php5/Package[php5-redis]/ensure: ensure changed 'purged' to 'present'
Notice: /Stage[main]/Mediawiki::Packages::Php5/Package[php5-intl]/ensure: ensure changed 'purged' to 'present'

That fix scap on beta.

It looks like we removed php5 packages as part of the move to jessie: https://github.com/wikimedia/operations-puppet/commit/35f6983b1a60b9f7cf1fa120dcf2f1df8fc8374c

Seems like we probably need it on any host that runs mwscripts: deployment hosts, terbium, the codfw terbium equivalent, and possibly fluorine.

So we have switched today the primary deployment server to mira.codfw.wmnet which is running Jessie. The European SWAT deploy had a portal change which requires to run:

cat /srv/mediawiki-staging/portals/urls-to-purge.txt | mwscript purgeList.php

That dies with:

PHP Fatal error:  Class 'Memcached' not found in /srv/mediawiki-staging/php-1.28.0-wmf.21/includes/libs/objectcache/MemcachedPeclBagOStuff.php on line 63
Fatal error: Class 'Memcached' not found in /srv/mediawiki-staging/php-1.28.0-wmf.21/includes/libs/objectcache/MemcachedPeclBagOStuff.php on line 63
Zppix awarded a token.Oct 11 2016, 1:20 PM

Change 313305 merged by Muehlenhoff:
Bring back Zend PHP on deployment server

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

Moritz has run puppet on mira.codfw.wmnet (Jessie) and that fixed the issue above.

We will most probably want to a similar patch for the work machine such as terbium/wassat whenever they get reimaged to Jessie.

Alternatively, find a way to get mwscript to use /usr/bin/php / HHVM which is T146285

Change 315260 had a related patch set uploaded (by Muehlenhoff):
Provide PHP packages for mwscript

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

Change 315260 merged by Muehlenhoff:
Provide PHP packages for mwscript

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

elukey triaged this task as Normal priority.Oct 18 2016, 2:54 PM
hashar closed this task as Resolved.Oct 24 2016, 2:58 PM
hashar claimed this task.

https://gerrit.wikimedia.org/r/#/c/315260/ adds mediawiki::packages::php5 on the role::mediawiki::maintenance servers. That fix it on deployment servers.