Last modified: 2014-09-24 14:58:37 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T72959, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 70959 - labs-vagrant provision failing in Mediawiki::Import_dump[labs_privacy]/Exec[import_dump_labs_privacy]
labs-vagrant provision failing in Mediawiki::Import_dump[labs_privacy]/Exec[i...
Status: RESOLVED FIXED
Product: MediaWiki-Vagrant
Classification: Unclassified
labs-vagrant (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Dan Duvall
:
: 71093 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-17 20:31 UTC by spage
Modified: 2014-09-24 14:58 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Except of puppet log from labs-vagrant provision (119.62 KB, application/octet-stream)
2014-09-17 23:06 UTC, Dan Duvall
Details

Description spage 2014-09-17 20:31:50 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"
Comment 1 spage 2014-09-17 20:52:37 UTC
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.)
Comment 2 spage 2014-09-17 22:02:20 UTC
(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.
Comment 3 Dan Duvall 2014-09-17 23:06:52 UTC
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"
Comment 4 Dan Duvall 2014-09-17 23:20:50 UTC
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.
Comment 5 Gerrit Notification Bot 2014-09-18 00:04:52 UTC
Change 161140 had a related patch set uploaded by Dduvall:
Configure wiki cache and upload directories

https://gerrit.wikimedia.org/r/161140
Comment 6 Dan Duvall 2014-09-22 17:37:56 UTC
*** Bug 71093 has been marked as a duplicate of this bug. ***
Comment 7 Gerrit Notification Bot 2014-09-22 22:46:00 UTC
Change 161140 merged by jenkins-bot:
Configure wiki cache and upload directories

https://gerrit.wikimedia.org/r/161140
Comment 8 Gerrit Notification Bot 2014-09-22 23:11:52 UTC
Change 162155 had a related patch set uploaded by Dduvall:
Removed unnecessary file resource conditional

https://gerrit.wikimedia.org/r/162155
Comment 9 Gerrit Notification Bot 2014-09-22 23:32:56 UTC
Change 162155 merged by jenkins-bot:
Removed unnecessary file resource conditional

https://gerrit.wikimedia.org/r/162155
Comment 10 Gerrit Notification Bot 2014-09-22 23:34:27 UTC
Change 162160 had a related patch set uploaded by BryanDavis:
Stop changing git::clone shared permissions unconditionally

https://gerrit.wikimedia.org/r/162160
Comment 11 spage 2014-09-24 05:51:59 UTC
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.
Comment 12 Bryan Davis 2014-09-24 14:58:37 UTC
(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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links