[Wikidata-bugs] [Maniphest] [Commented On] T183274: import-dump command fails due to sudo broken file permissions

2018-01-11 Thread bd808
bd808 added a comment.
Likely one of:


the file is not readable in the VM for some reason (NFS/Vbox failure?)
php in the VM does not have bzip support (configuration problem?)
the archive is corrupt


The next workaround I would try is decompressing the dump before importing.TASK DETAILhttps://phabricator.wikimedia.org/T183274EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: bd808Cc: bd808, Aklapper, Hjfocs, Lahi, Gq86, GoranSMilovanovic, Kiailandi, QZanden, dachary, LawExplorer, Luke081515, Wikidata-bugs, aude, Ricordisamoa, Sjoerddebruin, Tpt, Mbch331, jeremyb___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T183274: import-dump command fails due to sudo broken file permissions

2018-01-11 Thread Hjfocs
Hjfocs added a comment.
mwscript now seems to run inside the vagrant box:

mwscript importDump.php --wiki=wikidatawiki --uploads wikidatawiki-20171220-pages-articles19.xml-p19072452p19140743.bz2

but complains:

PHP Warning:  fopen(compress.bzip2://wikidatawiki-20171220-pages-articles19.xml-p19072452p19140743.bz2): failed to open stream: operation failed in /vagrant/mediawiki/maintenance/importDump.php on line 276
PHP Stack trace:
PHP   1. {main}() /var/www/w/MWScript.php:0
PHP   2. require_once() /var/www/w/MWScript.php:95
PHP   3. require_once() /vagrant/mediawiki/maintenance/importDump.php:350
PHP   4. BackupReader->execute() /vagrant/mediawiki/maintenance/doMaintenance.php:94
PHP   5. BackupReader->importFromFile() /vagrant/mediawiki/maintenance/importDump.php:114
PHP   6. fopen() /vagrant/mediawiki/maintenance/importDump.php:276TASK DETAILhttps://phabricator.wikimedia.org/T183274EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: HjfocsCc: bd808, Aklapper, Hjfocs, Lahi, Gq86, GoranSMilovanovic, Kiailandi, QZanden, dachary, LawExplorer, Luke081515, Wikidata-bugs, aude, Ricordisamoa, Sjoerddebruin, Tpt, Mbch331, jeremyb___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T183274: import-dump command fails due to sudo broken file permissions

2018-01-11 Thread Hjfocs
Hjfocs added a comment.
Yeah, I was wondering the same thing. Will try out your suggestions. Thanks again!TASK DETAILhttps://phabricator.wikimedia.org/T183274EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: HjfocsCc: bd808, Aklapper, Hjfocs, Lahi, Gq86, GoranSMilovanovic, Kiailandi, QZanden, dachary, LawExplorer, Luke081515, Wikidata-bugs, aude, Ricordisamoa, Sjoerddebruin, Tpt, Mbch331, jeremyb___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T183274: import-dump command fails due to sudo broken file permissions

2018-01-11 Thread bd808
bd808 added a comment.
On a local test server:

$ cd $MY_MWVAGRANT_CHECKOUT
$ ls -l Wikitech-2018055417.xml
-rw-r--r--@ 1 bd808  staff   6.8K Jan 11 08:54 Wikitech-2018055417.xml
$ vagrant import-dump Wikitech-2018055417.xml
Done!
You might want to run rebuildrecentchanges.php to regenerate RecentChanges,
and initSiteStats.php to update page and revision counts
Rebuilding $wgRCMaxAge=7776000 seconds (90 days)
Clearing recentchanges table for time range...
Loading from page and revision tables...
Inserting from page and revision tables...
Updating links and size differences...
Loading from user, page, and logging tables...
Flagging bot account edits...
Flagging auto-patrolled edits...
Removing duplicate revision and logging entries...
Deleting feed timestamps.
Done.

One thing I just realized is that vagrant import-dump does not currently handle additional arguments like --wiki=wikidatawiki which would be needed to import the dump to a wiki other than the default (dbname "wiki"). You may be better off using mwscript and importDump.php manually inside the VM with something like:

$ vagrant ssh
$ cd /vagrant
$ mwscript importDump.php --wiki=wikidatawiki --uploads $PATH_TO_DUMPTASK DETAILhttps://phabricator.wikimedia.org/T183274EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: bd808Cc: bd808, Aklapper, Hjfocs, Lahi, Gq86, GoranSMilovanovic, Kiailandi, QZanden, dachary, LawExplorer, Luke081515, Wikidata-bugs, aude, Ricordisamoa, Sjoerddebruin, Tpt, Mbch331, jeremyb___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T183274: import-dump command fails due to sudo broken file permissions

2018-01-11 Thread Hjfocs
Hjfocs added a comment.
@bd808 , thanks for the comment. I tried the commands you suggested, now I'm getting a nicer:

bash: import-mediawiki-dump: command not foundTASK DETAILhttps://phabricator.wikimedia.org/T183274EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: HjfocsCc: bd808, Aklapper, Hjfocs, Lahi, Gq86, GoranSMilovanovic, Kiailandi, QZanden, dachary, LawExplorer, Luke081515, Wikidata-bugs, aude, Ricordisamoa, Sjoerddebruin, Tpt, Mbch331, jeremyb___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T183274: import-dump command fails due to sudo broken file permissions

2018-01-08 Thread bd808
bd808 added a comment.
sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set should never happen. This is pretty obviously a corrupted LXC container. If you run vagrant destroy -f && vagrant up && vagrant import-dump ... can you recreate this failure?TASK DETAILhttps://phabricator.wikimedia.org/T183274EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: bd808Cc: bd808, Aklapper, Hjfocs, Lahi, Gq86, GoranSMilovanovic, Kiailandi, QZanden, dachary, LawExplorer, Luke081515, Wikidata-bugs, aude, Ricordisamoa, Sjoerddebruin, Tpt, Mbch331, jeremyb___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs