Page MenuHomePhabricator

Vagrant 'commons' role doesn't create proper database tables
Closed, InvalidPublic


Enabled the 'commons' role in vagrant:

vagrant enable-role commons
vagrant provision

Then, tried to upload a file to the new commons site at Special:Upload. On submit of the form, I was sent to an error page which gave the following information:


DELETE FROM `globalimagelinks` WHERE gil_wiki = 'commonswiki' AND gil_to = 'Anon.png'


Function: GlobalUsage::deleteLinksToFile
Error: 1146 Table 'commonswiki.globalimagelinks' doesn't exist (


#0 /vagrant/mediawiki/includes/db/Database.php(1069): DatabaseBase->reportQueryError()
#1 /vagrant/mediawiki/includes/db/Database.php(2974): DatabaseBase->query()
#2 /vagrant/mediawiki/extensions/GlobalUsage/GlobalUsage_body.php(96): DatabaseBase->delete()
#3 /vagrant/mediawiki/extensions/GlobalUsage/GlobalUsageHooks.php(170): GlobalUsage->deleteLinksToFile()
#4 /vagrant/mediawiki/includes/Hooks.php(195): GlobalUsageHooks::onUploadComplete()
#5 /vagrant/mediawiki/includes/upload/UploadBase.php(719): Hooks::run()
#6 /vagrant/mediawiki/includes/specials/SpecialUpload.php(499): UploadBase->performUpload()
#7 /vagrant/mediawiki/includes/specials/SpecialUpload.php(197): SpecialUpload->processUpload()
#8 /vagrant/mediawiki/includes/specialpage/SpecialPage.php(384): SpecialUpload->execute()
#9 /vagrant/mediawiki/includes/specialpage/SpecialPageFactory.php(553): SpecialPage->run()
#10 /vagrant/mediawiki/includes/MediaWiki.php(280): SpecialPageFactory::executePath()
#11 /vagrant/mediawiki/includes/MediaWiki.php(727): MediaWiki->performRequest()
#12 /vagrant/mediawiki/includes/MediaWiki.php(506): MediaWiki->main()
#13 /vagrant/mediawiki/index.php(43): MediaWiki->run()
#14 /var/www/w/index.php(5): include()
#15 {main}

Event Timeline

Unicornisaurous raised the priority of this task from to Needs Triage.
Unicornisaurous updated the task description. (Show Details)
Restricted Application added subscribers: StudiesWorld, Steinsplitter, Aklapper. · View Herald TranscriptJan 5 2016, 12:47 AM
Unicornisaurous renamed this task from Vagrant 'commons' role doesn't create proper database database updates properly to Vagrant 'commons' role doesn't create proper database tables.Jan 5 2016, 12:48 AM
Unicornisaurous set Security to None.

This might be blocked by T122868.

Unicornisaurous closed this task as Invalid.Jan 8 2016, 9:36 PM
Unicornisaurous claimed this task.
Tgr added a subscriber: Tgr.Jan 8 2016, 9:40 PM

vagrant provision shows error messages in red when something fails but it is easy to miss in the huge wall of text. I don't know if we have any way to control that; as I understand it core vagrant commands cannot be plugged into.

@Tgr: There wasn't any red I don't believe. If it was trying to run the updates on the main wiki instead of the commonswiki it would pretend to succeed anyway, as it did in T122868 (silently fallback to default wiki)

Tgr reopened this task as Open.Jan 9 2016, 12:47 AM

If there was no obvious failure, then this is a bug. (Although I guess if there was one, that would also be a bug.) vagrant provision runs the updater on all wikis when GlobalUsage is installed, something apparently went wrong with that.

Tgr closed this task as Invalid.Jan 12 2016, 4:06 AM

Can't reproduce on a fresh box. If it happens again, please record the vagrant provision log (in debug mode, if it is reproducible).

Tgr added a comment.Jan 13 2016, 2:01 AM

Maybe related to the problem tackled in ?