Last modified: 2014-09-24 14:58:37 UTC
When I run `sudo labs-vagrant provision` on flow-tests labs instance, it reports a warning Notice: /Stage[main]/Role::Labs_initial_content/Mediawiki::Import_dump[labs_privacy]/Exec[import_dump_labs_privacy]/returns: PHP Warning: DOMDocument::load(): I/O warning : failed to load external entity "/srv/vagrant/mediawiki/languages/data/plurals.xml" in /srv/vagrant/mediawiki/includes/cache/LocalisationCache.php on line 656 followed by hundreds of lines of Notice: output, concluding with a red Error: mwscript importDump.php --wiki=wiki /vagrant/puppet/modules/labs/files/labs_privacy_policy.xml returned 1 instead of one of [0] Error: /Stage[main]/Role::Labs_initial_content/Mediawiki::Import_dump[labs_privacy]/Exec[import_dump_labs_privacy]/returns: change from notrun to 0 failed: mwscript importDump.php --wiki=wiki /vagrant/puppet/modules/labs/files/labs_privacy_policy.xml returned 1 instead of one of [0] The file plurals.xml exists at that location. The failure might be because * "imports are broken on hhvm" * plurals.xml has <!DOCTYPE supplementalData SYSTEM "../../common/dtd/ldmlSupplemental.dtd"> , I don't think that .dtd file exists. * "we have a security rule against allowing external entity loading"
bd808 suggested commenting out the "classes: ..." line in puppet/hieradata/environment/labs.yaml , that didn't help. marxarelli suggested `sudo chmod g+w /srv/vagrant/mediawiki/cache`. That did work and provision completed OK. (... I'm still getting 503 errors accessing the labs wiki instance.)
(In reply to spage from comment #1) > (... I'm still getting 503 errors accessing the labs wiki instance.) Turns out /var/run/hhvm/hhvm.hhbc had filled the tmpfs on /run that is only 200MB on flow-tests. I'll file a separate bug.
Created attachment 16508 [details] Except of puppet log from labs-vagrant provision I had to rebuild my instance today and was able to repro the issue. Line 529 from the attached log: Exception from line 1302 of /srv/vagrant/mediawiki/includes/cache/LocalisationCache.php: Unable to open CDB file for write "/vagrant/mediawiki/cache/l10n_cache-en.cdb"
MWV's mediawiki class does set the right permissions on its $cache_dir. file { [ $cache_dir, $upload_dir ]: ensure => directory, owner => 'vagrant', group => 'www-data', mode => '0775', } And the configuration in hieradata/common.yaml specifies /var/cache/mediawiki for $cache_dir so I'm not sure why the import script is trying to use medawiki/cache. dduvall@multimedia-perf:~$ ls -ld /var/cache/mediawiki/ drwxrwxr-x 2 vagrant www-data 4096 Sep 17 22:49 /var/cache/mediawiki/ The real issue seems to be that either: 1) MWV isn't configuring $wgFileCacheDirectory in a way that affects the import script; or 2) the import script isn't respecting this setting.
Change 161140 had a related patch set uploaded by Dduvall: Configure wiki cache and upload directories https://gerrit.wikimedia.org/r/161140
*** Bug 71093 has been marked as a duplicate of this bug. ***
Change 161140 merged by jenkins-bot: Configure wiki cache and upload directories https://gerrit.wikimedia.org/r/161140
Change 162155 had a related patch set uploaded by Dduvall: Removed unnecessary file resource conditional https://gerrit.wikimedia.org/r/162155
Change 162155 merged by jenkins-bot: Removed unnecessary file resource conditional https://gerrit.wikimedia.org/r/162155
Change 162160 had a related patch set uploaded by BryanDavis: Stop changing git::clone shared permissions unconditionally https://gerrit.wikimedia.org/r/162160
Labs provision is still failing in this script, but now with a different error, Notice: /Stage[main]/Role::Labs_initial_content/Mediawiki::Import_dump[labs_privacy]/Exec[import_dump_labs_privacy]/returns: PHP Warning: require_once(/srv/vagrant/mediawiki/maintenance/importDump.php): failed to open stream: Permission denied in /var/www/w/MWScript.php on line 89 The file exists but has restricted permissions: -rw-rw---- 1 vagrant wikidev 8745 Aug 1 21:43 /vagrant/mediawiki/maintenance/importDump.php , maybe the script is running as user www-data, who can't read that file. See also bug 71219.
(In reply to spage from comment #11) > Labs provision is still failing in this script, but now with a different > error, > > Notice: > /Stage[main]/Role::Labs_initial_content/Mediawiki::Import_dump[labs_privacy]/ > Exec[import_dump_labs_privacy]/returns: PHP Warning: > require_once(/srv/vagrant/mediawiki/maintenance/importDump.php): failed to > open stream: Permission denied in /var/www/w/MWScript.php on line 89 > > The file exists but has restricted permissions: > > -rw-rw---- 1 vagrant wikidev 8745 Aug 1 21:43 > /vagrant/mediawiki/maintenance/importDump.php > > , maybe the script is running as user www-data, who can't read that file. > See also bug 71219. Fix for permissions documented in bug 71219 and <https://lists.wikimedia.org/pipermail/labs-l/2014-September/002949.html>: $ sudo chmod -R o+rX /srv/vagrant