Page MenuHomePhabricator

[EPIC] Upgrade MediaWiki-Vagrant to Debian Bullseye
Open, Needs TriagePublic

Description

Production is going to move to Bullseye (T291916) and given the delays that T256822 faced, it is a good idea to pre-emptively investigate what needs to be done to migrate to Bullseye, keeping in mind things like bullseye's default PHP version (8).


Previous: T256822: [EPIC] Upgrade MediaWiki-Vagrant to Debian Buster
Next: T365935: [EPIC] Upgrade MediaWiki-Vagrant to Debian Bookworm

Event Timeline

Let's see:

  • There are no packages for PHP in Wikimedia's APT repository, so that means falling back to bullseye's bundled PHP. This is 7.4, but with T319432 production will move to 8.1, through Wikimedia-provided packages. That means taking into account that switching back should be as simple as reverting a single patch.
    • In addition, if the switch to PHP 8.1 happens before T291916: Tracking task for Bullseye migrations in production, backports will be necessary, but at the time of writing, bullseye-backports does not provide 8.1. This means using Ondrej's PPA.
      • 844932 makes Ondrej's PPA part of mediawiki-vagrant for ARM64, removing the necessity signification changes as that change uses it as a fallback.
  • In regards to providers, there is no LXC provider, nor a dedicated VMWare fusion image.
    • For LXC, I might get around to creating one, see T321984
    • aarch64 was added through a custom provider later on, but there is none for bullseye
  • https://gerrit.wikimedia.org/r/c/mediawiki/vagrant/+/850572/ needs to be reverted; this definitely doesn't apply anymore for bullseye

Change 930938 had a related patch set uploaded (by Mainframe98; author: Mainframe98):

[mediawiki/vagrant@master] bullseye: Switch base image to Debian Bullseye

https://gerrit.wikimedia.org/r/930938

I'm experiencing T338356: Vagrant fails to create apt.conf.d/01no-recommended during setup and couldn't find a fix. It turned out to be easier to just convert to bullseye. It would be great if we could get a separate branch to use while we wait for production to move to bullseye.

It would be great if we could get a separate branch to use while we wait for production to move to bullseye.

bullseye-migration

Change 932266 had a related patch set uploaded (by Mainframe98; author: Mainframe98):

[mediawiki/vagrant@bullseye-migration] bullseye: Switch base image to Debian Bullseye

https://gerrit.wikimedia.org/r/932266

Change 930938 abandoned by Mainframe98:

[mediawiki/vagrant@master] bullseye: Switch base image to Debian Bullseye

Reason:

This shouldn't go on master. I cannot move the change however

https://gerrit.wikimedia.org/r/930938

Change 932266 merged by jenkins-bot:

[mediawiki/vagrant@bullseye-migration] bullseye: Switch base image to Debian Bullseye

https://gerrit.wikimedia.org/r/932266

BullseyeTest$ vagrant roles enable addlink advancedsearch buggy cirrussearch contenttranslation flow growthexperiments mobilefrontend monobook mysql_strict oauth psr3 visualeditor wikimediaevents wikimediamessages
Ok. Run `vagrant provision` to apply your changes.

BullseyeTest$ vagrant provision
...
==> default: Error: /Stage[main]/Packages::Libmariadbclient_dev/Package[libmariadbclient-dev]/ensure: change from 'purged' to 'present' failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install libmariadbclient-dev' returned 100: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: Package libmariadbclient-dev is not available, but is referred to by another package.
==> default: This may mean that the package is missing, has been obsoleted, or
==> default: is only available from another source
==> default: However the following packages replace it:
==> default:   libmariadb-dev-compat libmariadb-dev
==> default: 
==> default: E: Package 'libmariadbclient-dev' has no installation candidate
...
==> default: Error: /Stage[main]/Packages::Python3.7/Package[python3.7]/ensure: change from 'purged' to 'present' failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install python3.7' returned 100: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: Package python3.7 is not available, but is referred to by another package.
==> default: This may mean that the package is missing, has been obsoleted, or
==> default: is only available from another source
==> default: 
==> default: E: Package 'python3.7' has no installation candidate
...
==> default: Error: /Stage[main]/Packages::Python3.7_dev/Package[python3.7-dev]/ensure: change from 'purged' to 'present' failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install python3.7-dev' returned 100: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: E: Unable to locate package python3.7-dev
==> default: E: Couldn't find any package by glob 'python3.7-dev'
==> default: E: Couldn't find any package by regex 'python3.7-dev'
...
==> default: Error: Could not find command '/usr/bin/npm'
==> default: Error: /Stage[main]/Npm::Globals/Npm::Global[mocha]/Exec[npm_global_mocha]/returns: change from 'notrun' to ['0'] failed: Could not find command '/usr/bin/npm'
==> default: Error: Could not find command '/usr/bin/npm'
==> default: Error: /Stage[main]/Npm::Globals/Npm::Global[grunt-cli]/Exec[npm_global_grunt-cli]/returns: change from 'notrun' to ['0'] failed: Could not find command '/usr/bin/npm'
==> default: Error: Could not find command '/usr/bin/npm'
==> default: Error: /Stage[main]/Npm::Globals/Npm::Global[node-gyp]/Exec[npm_global_node-gyp]/returns: change from 'notrun' to ['0'] failed: Could not find command '/usr/bin/npm'
==> default: Error: Could not find command '/usr/bin/npm'
==> default: Error: /Stage[main]/Npm::Globals/Npm::Global[node-pre-gyp]/Exec[npm_global_node-pre-gyp]/returns: change from 'notrun' to ['0'] failed: Could not find command '/usr/bin/npm'

Change 932433 had a related patch set uploaded (by Mainframe98; author: Mainframe98):

[mediawiki/vagrant@bullseye-migration] Update package names for buster

https://gerrit.wikimedia.org/r/932433

Change 932452 had a related patch set uploaded (by Mainframe98; author: Mainframe98):

[mediawiki/vagrant@bullseye-migration] NodeJS: Use the version (10) that is provided by bullseye

https://gerrit.wikimedia.org/r/932452

I split the patch into two parts, mostly because I'm not very familiar with node/npm in Vagrant. I think the complexity came from the whole, "node is outdated but things rely on outdated npm" debacle, so be sure to test if it actually works. It provisions at least.

(Also, what do you need all those roles for? Good lord, it took almost an hour to provision the stupid thing!)

Change 932433 merged by jenkins-bot:

[mediawiki/vagrant@bullseye-migration] Update package names for buster

https://gerrit.wikimedia.org/r/932433

Change 932452 merged by jenkins-bot:

[mediawiki/vagrant@bullseye-migration] NodeJS: Use the version (12) that is provided by bullseye

https://gerrit.wikimedia.org/r/932452

==> default: Error: /Stage[main]/Role::Addlink/Systemd::Service[mwaddlink]/Service[mwaddlink]/ensure: change from 'stopped' to 'running' failed: Systemd start for mwaddlink failed!
==> default: journalctl log for mwaddlink:
==> default: -- Journal begins at Sat 2023-06-24 11:16:05 UTC, ends at Sat 2023-06-24 11:30:32 UTC. --
==> default: -- No entries --

Jun 24 18:48:10 bullseyetest mwaddlink[184157]: Error: While importing 'app', an ImportError was raised:
Jun 24 18:48:10 bullseyetest mwaddlink[184157]: Traceback (most recent call last):
Jun 24 18:48:10 bullseyetest mwaddlink[184157]:   File "/vagrant/srv/mwaddlink/.venv/lib/python3.9/site-packages/flask/cli.py", line 260, in locate_app
Jun 24 18:48:10 bullseyetest mwaddlink[184157]:     __import__(module_name)
Jun 24 18:48:10 bullseyetest mwaddlink[184157]:   File "/vagrant/srv/mwaddlink/app.py", line 24, in <module>
Jun 24 18:48:10 bullseyetest mwaddlink[184157]:     from src.scripts.utils import normalise_title, MentionRegexException
Jun 24 18:48:10 bullseyetest mwaddlink[184157]:   File "/vagrant/srv/mwaddlink/src/scripts/utils.py", line 2, in <module>
Jun 24 18:48:10 bullseyetest mwaddlink[184157]:     from icu import UnicodeString, Locale
Jun 24 18:48:10 bullseyetest mwaddlink[184157]: ModuleNotFoundError: No module named 'icu'

Change 932661 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/vagrant@bullseye-migration] addlink: Add python3-icu dependency

https://gerrit.wikimedia.org/r/932661

Tgr renamed this task from [EPIC] Upgrade to Debian Bullseye to [EPIC] Upgrade Vagrant to Debian Bullseye.Sun, May 26, 9:43 AM
Tgr renamed this task from [EPIC] Upgrade Vagrant to Debian Bullseye to [EPIC] Upgrade MediaWiki-Vagrant to Debian Bullseye.