T256822: [EPIC] Upgrade MediaWiki-Vagrant to Debian Buster requires the VM to be rebuilt.
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | • Tgr | T321968 Rebuild Wikispore Vagrant box on Buster | |||
Resolved | • Tgr | T321984 Make MediaWiki-Vagrant LXC provider work with a Buster base image |
Event Timeline
Plan:
- (on guest) mysqldump --add-drop-database --databases `mysql -rNe 'show databases' | ack -v '^(mysql|information_schema|performance_schema)$'` > /vagrant/dump.sql
- (on guest) sudo tar --absolute-names -cvzf /vagrant/wikispore-wiki-20221031-files.tgz /srv/images
- (on host, in main vagrant dir) git pull --rebase
- (on host, in main vagrant dir) cherry-pick 850642
- (on host) vagrant destroy -f; vagrant up
- (on host) vagrant git-update
- (on guest) mysql < /vagrant/dump.sql
- (on guest) sudo tar -C / --same-owner -xvf /vagrant/wikispore-wiki-20221031-files.tgz
- (on host) vagrant reload (to clear the cache)
- (on guest) mwscript update.php --quick
- (on guest) mwscript extensions/WSOAuth/maintenance/multiAuthMigrate.php --provider mediawiki
With the patch from T321984: Make MediaWiki-Vagrant LXC provider work with a Buster base image, provisioning/updating works, but OAuth login seems broken.
Apparently rEWAUaa1454d4f010: Add support for PluggableAuth 6.0 revamped how WSOAuth needs to be configured.
Change 850660 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):
[mediawiki/vagrant@master] Add mediawiki::server_protocol hiera setting
Change 850661 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):
[mediawiki/vagrant@master] wsoauth: Update configuration format
Change 850660 merged by jenkins-bot:
[mediawiki/vagrant@master] Add mediawiki::server_protocol hiera setting
Change 850661 merged by jenkins-bot:
[mediawiki/vagrant@master] wsoauth: Update configuration format
Failed on prod with
==> default: Notice: /Stage[main]/Mediawiki/Exec[composer update /vagrant/mediawiki]/returns: Do not run Composer as root/super user! See https://getcomposer.org/root for details ==> default: Notice: /Stage[main]/Mediawiki/Exec[composer update /vagrant/mediawiki]/returns: The "wikimedia/composer-merge-plugin" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.3.0"). You may need to run composer update with the "--no-plugins" option. ==> default: Notice: /Stage[main]/Mediawiki/Exec[composer update /vagrant/mediawiki]/returns: > ComposerHookHandler:: default: Notice: /Stage[main]/Mediawiki/Exec[composer update /vagrant/mediawiki]/returns: Script ComposerHookHandler::onPreUpdate handling the pre-update-cmd event terminated with an exception ==> default: Notice: /Stage[main]/Mediawiki/Exec[composer update /vagrant/mediawiki]/returns: ==> default: Notice: /Stage[main]/Mediawiki/Exec[composer update /vagrant/mediawiki]/returns: In Package.php line 703: ==> default: Notice: /Stage[main]/Mediawiki/Exec[composer update /vagrant/mediawiki]/returns: ==> default: Notice: /Stage[main]/Mediawiki/Exec[composer update /vagrant/mediawiki]/returns: Package::setProvides must be called with a map of lowercased package name = ==> default: Notice: /Stage[main]/Mediawiki/Exec[composer update /vagrant/mediawiki]/returns: > Link object, got a indexed array, this is deprecated and you should fix y ==> default: Notice: /Stage[main]/Mediawiki/Exec[composer update /vagrant/mediawiki]/returns: our usage. ==> default: Notice: /Stage[main]/Mediawiki/Exec[composer update /vagrant/mediawiki]/returns: ==> default: Notice: /Stage[main]/Mediawiki/Exec[composer update /vagrant/mediawiki]/returns: ==> default: Notice: /Stage[main]/Mediawiki/Exec[composer update /vagrant/mediawiki]/returns: update [--with WITH] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--dev] [--no-dev] [--lock] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--no-autoloader] [--no-suggest] [--no-progress] [-w|--with-dependencies] [-W|--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>...] ==> default: Error: /Stage[main]/Mediawiki/Exec[composer update /vagrant/mediawiki]: Failed to call refresh: '/usr/local/bin/composer update --no-progress' returned 1 instead of one of [0] ==> default: Error: /Stage[main]/Mediawiki/Exec[composer update /vagrant/mediawiki]: '/usr/local/bin/composer update --no-progress' returned 1 instead of one of [0]
Not sure which of these are warnings and which is the one that actually broke provisioning. Also not sure why this didn't happen on test.
On test:
vagrant@mediawiki-vagrant:/vagrant/mediawiki$ /usr/local/bin/composer --version Composer version 2.4.4 2022-10-27 14:39:29 vagrant@mediawiki-vagrant:/vagrant/mediawiki$ /usr/local/bin/composer update --no-progress > ComposerHookHandler::onPreUpdate Loading composer repositories with package information ...
On prod:
vagrant@mediawiki-vagrant:/vagrant/mediawiki$ /usr/local/bin/composer --version Composer version 2.4.4 2022-10-27 14:39:29 vagrant@mediawiki-vagrant:/vagrant/mediawiki$ /usr/local/bin/composer update --no-progress The "wikimedia/composer-merge-plugin" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.3.0"). You may need to run composer update with the "--no-plugins" option. > ComposerHookHandler::onPreUpdate Script ComposerHookHandler::onPreUpdate handling the pre-update-cmd event terminated with an exception In Package.php line 703: Package::setProvides must be called with a map of lowercased package name => Link object, got a indexed array, this is deprecated and you should fix your usage. update [--with WITH] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--dev] [--no-dev] [--lock] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--no-autoloader] [--no-suggest] [--no-progress] [-w|--with-dependencies] [-W|--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>...]
MediaWiki was too old to work with modern composer. Running vagrant git-update fixed the issue. There were a number of small ways in which prod was out of sync (uncommitted changes to PageForms, messed up file permissions) but those were easily fixable.
The installation works now in theory (e.g. maintenance scripts run without any problem). The current issue is that for some reason Vagrant cannot match the domain name to the wiki database name and throws up the "no such wiki" page instead.
Apparently PHP (under Apache only, not CLI) does not see the /vagrant directory (an NFS share). But only on that one box, not the identically set up wikispore-test :/
As a short-term fix, I disabled NFS (vagrant config nfs_shares no; vagrant reload). This probably has a performance cost.
Filed T322975: NFS broken on Wikispore about the NFS weirdness, but otherwise this is done.