Page MenuHomePhabricator

Install PHP 8.1 on deployment-prep bullseye MediaWiki instances
Closed, ResolvedPublicFeature

Description

Figure out how to use the packages from https://apt.wikimedia.org/wikimedia/dists/bullseye-wikimedia/component/php81/ to replace PHP 7.4 with PHP 8.1. "Run this janky shell script" is an acceptable solution at this point.

  • deployment-snapshot05.deployment-prep.eqiad1.wikimedia.cloud
  • deployment-parsoid14.deployment-prep.eqiad1.wikimedia.cloud
  • deployment-mediawiki13.deployment-prep.eqiad1.wikimedia.cloud
  • deployment-mediawiki14.deployment-prep.eqiad1.wikimedia.cloud
  • deployment-mwmaint03.deployment-prep.eqiad1.wikimedia.cloud
  • deployment-jobrunner05.deployment-prep.eqiad1.wikimedia.cloud
  • deployment-deploy04.deployment-prep.eqiad1.wikimedia.cloud

Related Objects

StatusSubtypeAssignedTask
ResolvedNone
ResolvedReedy
StalledNone
OpenNone
OpenNone
OpenNone
ResolvedReedy
ResolvedKrinkle
ResolvedKrinkle
ResolvedJdforrester-WMF
ResolvedJdforrester-WMF
ResolvedJdforrester-WMF
ResolvedLucas_Werkmeister_WMDE
ResolvedNone
ResolvedJdforrester-WMF
ResolvedDaimona
ResolvedJdforrester-WMF
DeclinedNone
ResolvedScott_French
ResolvedScott_French
ResolvedScott_French
Resolvedcscott
ResolvedScott_French
DuplicatePRODUCTION ERRORNone
ResolvedPRODUCTION ERRORMichael
ResolvedPRODUCTION ERRORMichael
ResolvedMichael
DuplicatePRODUCTION ERRORNone
ResolvedTgr
ResolvedNone
ResolvedDAlangi_WMF
ResolvedTgr
ResolvedDAlangi_WMF
ResolvedTgr
ResolvedTgr
ResolvedAtieno
OpenNone
Resolvedbrouberol
ResolvedScott_French
ResolvedScott_French
ResolvedScott_French
ResolvedScott_French
ResolvedScott_French
ResolvedScott_French
ResolvedKrinkle
ResolvedKrinkle
ResolvedScott_French
ResolvedKrinkle
ResolvedTgr
ResolvedScott_French
Resolvedjnuche
ResolvedJdforrester-WMF
ResolvedBUG REPORTbd808
ResolvedReedy
ResolvedReedy
Resolvedseanleong-WMDE
StalledNone
OpenNone
ResolvedLucas_Werkmeister_WMDE
ResolvedDaimona
ResolvedDaimona
ResolvedDaimona
OpenNone
ResolvedUmherirrender
OpenNone
ResolvedUmherirrender
ResolvedUmherirrender
Resolved mszabo
Resolvedtstarling
ResolvedUmherirrender
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedPhysikerwelt
ResolvedTgr
ResolvedUmherirrender
ResolvedUmherirrender
ResolvedNone
ResolvedUmherirrender
ResolvedNone
ResolvedNone
ResolvedkarapayneWMDE
ResolvedAudreyPenven_WMDE
ResolvedAudreyPenven_WMDE
ResolvedLucas_Werkmeister_WMDE
ResolvedLucas_Werkmeister_WMDE
ResolvedUmherirrender
Resolvedthiemowmde
ResolvedLucas_Werkmeister_WMDE
ResolvedUmherirrender
ResolvedUmherirrender
ResolvedUmherirrender
ResolvedUmherirrender
ResolvedUmherirrender
ResolvedUmherirrender
Resolved mszabo
ResolvedxSavitar
ResolvedUmherirrender
ResolvedUmherirrender
ResolvedUmherirrender
OpenNone
OpenNone
OpenNone
OpenDannyS712
ResolvedUmherirrender
Resolved larissagaulia
ResolvedUmherirrender
ResolvedJdforrester-WMF
ResolvedJdforrester-WMF
ResolvedJdforrester-WMF
ResolvedKrinkle
ResolvedFeaturebd808

Event Timeline

Restricted Application changed the subtype of this task from "Task" to "Spike". · View Herald TranscriptOct 31 2024, 5:29 PM
Restricted Application added a project: User-bd808. · View Herald Transcript
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
bd808 triaged this task as Medium priority.Oct 31 2024, 5:29 PM
bd808 moved this task from To Do to In Dev/Progress on the User-bd808 board.

Mentioned in SAL (#wikimedia-releng) [2024-10-31T17:31:54Z] <bd808> Created deployment-mediawiki81.deployment-prep.eqiad1.wikimedia.cloud (T378752)

Change #1085471 had a related patch set uploaded (by BryanDavis; author: Bryan Davis):

[operations/puppet@production] [WIP] Allow provisioning MediaWiki with PHP 8.1

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

Today's progress:

  • Created deployment-mediawiki81.deployment-prep.eqiad1.wikimedia.cloud
  • Cherry-picked https://gerrit.wikimedia.org/r/c/operations/puppet/+/1085471 to deployment-puppetserver-1.deployment-prep.eqiad1.wikimedia.cloud
  • Added instance local hiera for deployment-mediawiki81:
    • profile::mediawiki::php::php_versions: ['8.1']
    • profile::mediawiki::php::absented_php_versions: ['7.4']
$ ssh deployment-mediawiki81.deployment-prep.eqiad1.wikimedia.cloud
$ sudo -i run-puppet-agent
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Info: Caching catalog for deployment-mediawiki81.deployment-prep.eqiad1.wikimedia.cloud
Info: Applying configuration version '(0c9d579a79) gitpuppet - [WIP] Allow provisioning MediaWiki with PHP 8.1'
Notice: Applied catalog in 9.10 seconds
$ php --version
Warning: PHP Startup: Unable to load dynamic library 'json.so' (tried: /usr/lib/php/20210902/json.so (/usr/lib/php/20210902/json.so: cannot open shared object file: No such file or directory), /usr/lib/php/20210902/json.so.so (/usr/lib/php/20210902/json.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 8.1.30 (cli) (built: Sep 30 2024 15:09:07) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.30, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.30, Copyright (c), by Zend Technologies

Close.

The binary we are using from https://apt.wikimedia.org/wikimedia/dists/bullseye-wikimedia/component/php81/ has the json compiled in. The ::php::default_extensions Puppet module currently unconditionally configures a dynamic load of the extension. This in turn causes the "Warning: PHP Startup: Unable to load dynamic library 'json.so' (tried: /usr/lib/php/20210902/json.so (/usr/lib/php/20210902/json.so: cannot open shared object file: No such file or directory), /usr/lib/php/20210902/json.so.so (/usr/lib/php/20210902/json.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0".

The fix is not to include json as an extension under PHP 8.1. This may turn out to be "fun" to resolve in the Puppet repo.

The fix is not to include json as an extension under PHP 8.1. This may turn out to be "fun" to resolve in the Puppet repo.

https://gerrit.wikimedia.org/r/c/operations/puppet/+/1085471/7..8 seems to work.

$ cd /etc/php/8.1
$ find . -name '*json*'
./mods-available/json.ini
./fpm/conf.d/20-json.ini
./cli/conf.d/20-json.ini
$ sudo find . -name '*json*' -delete
$ sudo -i run-puppet-agent
Info: Using environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for deployment-mediawiki81.deployment-prep.eqiad1.wikimedia.cloud
Info: Applying configuration version '(e220ee7a8a) gitpuppet - [WIP] Allow provisioning MediaWiki with PHP 8.1'
Notice: Applied catalog in 11.38 seconds
$ php --version
PHP 8.1.30 (cli) (built: Sep 30 2024 15:09:07) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.30, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.30, Copyright (c), by Zend Technologies
$ hostname -f
deployment-mediawiki81.deployment-prep.eqiad1.wikimedia.cloud
$ curl --include --head --connect-to ::$HOSTNAME -H 'X-Forwarded-Proto: https' 'http://meta.wikimedia.beta.wmflabs.org/wiki/Main_Page'
HTTP/1.1 503 Service Unavailable
Date: Tue, 05 Nov 2024 16:41:27 GMT
Server: deployment-mediawiki81.deployment-prep.eqiad1.wikimedia.cloud
Last-Modified: Thu, 01 Aug 2024 20:41:36 GMT
ETag: "4c9-61ea53cb0c441"
Accept-Ranges: bytes
Content-Length: 1225
Backend-Timing: D=848 t=1730824887173811
Connection: close
Content-Type: text/html

This seems to be crashing so early that hacking the config to turn on local logging does not yield any output. If I remove the --head restriction I do however see that the 503 page is using the "Wikimedia Error" template so not all is lost.

It turns out that I needed to overload a couple more hiera settings:

profile::mediawiki::jobrunner::default_php_version: '8.1'
profile::mediawiki::webserver::default_php_version: '8.1'

There is a twisted path down through the ops/puppet.git module stack for this, but eventually it controls the SetHandler setting in the Apache2 conf describing how to connect to the php-fpm service.

$ curl --head --include --connect-to ::$HOSTNAME -H 'X-Forwarded-Proto: https' 'http://meta.wikimedia.beta.wmflabs.org/wiki/Main_Page'
HTTP/1.1 200 OK
Date: Tue, 05 Nov 2024 23:54:17 GMT
Server: deployment-mediawiki81.deployment-prep.eqiad1.wikimedia.cloud
X-Powered-By: PHP/8.1.30
X-Content-Type-Options: nosniff
Content-language: en
X-Analytics: ns=0;page_id=6708;rev_id=50307
Content-Security-Policy: script-src 'unsafe-eval' blob: 'self' *.wikimedia.beta.wmflabs.org *.wikipedia.beta.wmflabs.org *.wikinews.beta.wmflabs.org *.wiktionary.beta.wmflabs.org *.wikibooks.beta.wmflabs.org *.wikiversity.beta.wmflabs.org *.wikisource.beta.wmflabs.org *.wikiquote.beta.wmflabs.org wikidata.beta.wmflabs.org m.wikidata.beta.wmflabs.org *.wikivoyage.beta.wmflabs.org *.mediawiki.beta.wmflabs.org wikifunctions.beta.wmflabs.org m.wikifunctions.beta.wmflabs.org *.wikimedia.org *.wikipedia.org *.wikinews.org *.wiktionary.org *.wikibooks.org *.wikiversity.org *.wikisource.org wikisource.org *.wikiquote.org *.wikidata.org *.wikifunctions.org *.wikivoyage.org *.mediawiki.org ws://visualeditor-realtime.wmflabs.org cxserver-beta.wmcloud.org recommend.wmflabs.org *.wikipedia.beta.wmcloud.org 'unsafe-inline' login.wikimedia.beta.wmflabs.org; default-src 'self' data: blob: https://upload.wikimedia.beta.wmflabs.org upload.wikimedia.beta.wmflabs.org https://commons.wikimedia.beta.wmflabs.org https://upload.wikimedia.org https://commons.wikimedia.org *.wikimedia.beta.wmflabs.org *.wikipedia.beta.wmflabs.org *.wikinews.beta.wmflabs.org *.wiktionary.beta.wmflabs.org *.wikibooks.beta.wmflabs.org *.wikiversity.beta.wmflabs.org *.wikisource.beta.wmflabs.org *.wikiquote.beta.wmflabs.org wikidata.beta.wmflabs.org m.wikidata.beta.wmflabs.org *.wikivoyage.beta.wmflabs.org *.mediawiki.beta.wmflabs.org wikifunctions.beta.wmflabs.org m.wikifunctions.beta.wmflabs.org *.wikimedia.org *.wikipedia.org *.wikinews.org *.wiktionary.org *.wikibooks.org *.wikiversity.org *.wikisource.org wikisource.org *.wikiquote.org *.wikidata.org *.wikifunctions.org *.wikivoyage.org *.mediawiki.org ws://visualeditor-realtime.wmflabs.org cxserver-beta.wmcloud.org recommend.wmflabs.org *.wikipedia.beta.wmcloud.org wikimedia.org en.wikipedia.beta.wmflabs.org en.wikibooks.beta.wmflabs.org en.wikinews.beta.wmflabs.org en.wikiquote.beta.wmflabs.org en.wikisource.beta.wmflabs.org en.wikiversity.beta.wmflabs.org en.wikivoyage.beta.wmflabs.org en.wiktionary.beta.wmflabs.org api.wikimedia.beta.wmflabs.org commons.wikimedia.beta.wmflabs.org test2.wikipedia.beta.wmcloud.org pl.wikivoyage.beta.wmcloud.org login.wikimedia.beta.wmflabs.org; style-src 'self' data: blob: https://upload.wikimedia.beta.wmflabs.org upload.wikimedia.beta.wmflabs.org https://commons.wikimedia.beta.wmflabs.org https://upload.wikimedia.org https://commons.wikimedia.org *.wikimedia.beta.wmflabs.org *.wikipedia.beta.wmflabs.org *.wikinews.beta.wmflabs.org *.wiktionary.beta.wmflabs.org *.wikibooks.beta.wmflabs.org *.wikiversity.beta.wmflabs.org *.wikisource.beta.wmflabs.org *.wikiquote.beta.wmflabs.org wikidata.beta.wmflabs.org m.wikidata.beta.wmflabs.org *.wikivoyage.beta.wmflabs.org *.mediawiki.beta.wmflabs.org wikifunctions.beta.wmflabs.org m.wikifunctions.beta.wmflabs.org *.wikimedia.org *.wikipedia.org *.wikinews.org *.wiktionary.org *.wikibooks.org *.wikiversity.org *.wikisource.org wikisource.org *.wikiquote.org *.wikidata.org *.wikifunctions.org *.wikivoyage.org *.mediawiki.org ws://visualeditor-realtime.wmflabs.org cxserver-beta.wmcloud.org recommend.wmflabs.org *.wikipedia.beta.wmcloud.org wikimedia.org 'unsafe-inline'; object-src 'none'; report-uri /w/api.php?action=cspreport&format=json
Vary: Accept-Encoding,Cookie,Authorization
Cache-Control: s-maxage=1209600, must-revalidate, max-age=0
X-Request-Id: ZyqwKaaASCKb9y20xPmu-wAAAIM
Last-Modified: Tue, 22 Oct 2024 23:54:17 GMT
Backend-Timing: D=282764 t=1730850857294078
Content-Type: text/html; charset=UTF-8
NOTE: The deployment-prep wide settings for this currently live in hieradata/cloud/eqiad1/deployment-prep/common.yaml. It might be nice to move that whole file out of ops/puppet.git and into the Horizon managed settings for the project.
[00:02]  <    bd808> Southparkfan: Do you remember from your work on deployment-prep bullseye stuff what changes are needed to pool a new MediaWiki server? Context is T378752 and my next step desire to route traffic to that PHP 8.1 node.
[00:02]  < stashbot> T378752: Figure out how to install PHP 8.1 on bullseye MediaWiki instances - https://phabricator.wikimedia.org/T378752
[00:05]  <    bd808> ah ha, I bet T361387 will tell me a lot
[00:05]  < stashbot> T361387: Replace or delete deployment-mediawiki[11-12].deployement-prep.eqiad1.wikimedia.cloud - https://phabricator.wikimedia.org/T361387
[00:06]  <Southparkfan> bd808: I'm about to log off to get some sleep, but what I can tell for sure is that I had to provision the new appservers with puppet, then add them to their appropriate dsh groups so that they get the scap syncs
[00:07]  <Southparkfan> However, I don't think all appservers are pooled in ATS for cache_text traffic, iirc only one of the two appservers is pooled right now. Technically, the other one can also serve traffic just fine, though
[00:08]  <    bd808> Southparkfan: good to know. I found some of what you did. I'll ask you more if I end up really stuck. :)
[00:09]  <Southparkfan> I also recall having issues installing new VMs with certain puppet roles right away, at some point I just decided to bootstrap them with the 'base puppet role' (i.e. the default role for Cloud VPS instances, nothing app-specific applied), then changing the puppet role to the appropriate role
[00:10]  <    bd808> I had "fun" with puppetmaster certs on the new instance I built. It felt like there has been some regression in switching to a self-hosted puppetmaster
[00:10]  <Southparkfan> (otherwise the host could get stuck in some unknown state, where it boot# fine, but wouldn't allow me to log in)
[00:11]  <    bd808> I luckily have all the s3cr3t cloud root juice if that happens
[00:12]  <Southparkfan> Oh heh, I didn't have issues with the puppetmaster certificates. I did have issues with incorrect permissions on the git clone of the puppet repo on the puppetmaster in deployment-prep, but I think it has been fixed since
[00:12]  <Southparkfan> Ahaha :D magic sauce for those who shall not depend on working LDAP clients
[00:13]  <    bd808> yeah, I can even enter through the vm's root console if things are very messed up.
[00:14]  <Southparkfan> Feel free to brain dump the installation process somewhere, I can surely take a look later today (or tomorrow I think, with regards to your TZ - it's already past midnight here)
[00:15]  <    bd808> Southparkfan: thanks for the offer. Get some good sleep. :)

T361387: Replace or delete deployment-mediawiki[11-12].deployement-prep.eqiad1.wikimedia.cloud

I would really like to consolidate the hiera settings for deployment-prep into the Horizon managed system because it is so much easier for mortals to use than the ops/puppet.git:hieradata/cloud/eqiad1/deployment-prep/common.yaml settings. This is a distraction from this task however and also potentially controversial, so I am making this note and moving on with my experiment.

Change #1098647 had a related patch set uploaded (by BryanDavis; author: Bryan Davis):

[operations/puppet@production] deployment-prep: Add PHP 8.1 appservers

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

I did some crawling around in various running WMCS instances and configuration repositories to try and figure out how the InternetCDNMediaWiki traffic flow finds a MediaWiki server. For my current purposes the interesting bit seems to be the data in the profile::trafficserver::backend::mapping_rules hiera key for prefix "deployment-cache-text". This collection of hiera settings configures the Apache Traffic Server (ATS) cache server which is the lowest layer of the CDN edge stack. When a URL is missed in the in-memory and on-disk cache pools, ATS looks at this config to figure out which upstream server to contact to handle the request. At the time I am writing this comment, the interest bits are:

deployment-cache-text.yaml excerpt
- params:
  - '@plugin=/usr/lib/trafficserver/modules/tslua.so'
  - '@pparam=/etc/trafficserver/lua/rb-mw-mangling.lua'
  replacement: http://deployment-mediawiki13.deployment-prep.eqiad1.wikimedia.cloud/w/api.php
  target: http://(.*)/w/api.php
  type: regex_map
- params:
  - '@plugin=/usr/lib/trafficserver/modules/tslua.so'
  - '@pparam=/etc/trafficserver/lua/normalize-path.lua'
  - '@pparam="3A 2F 40 21 24 28 29 2A 2C 3B"'
  - '@pparam="5B 5D 26 27 2B 3D"'
  - '@plugin=/usr/lib/trafficserver/modules/tslua.so'
  - '@pparam=/etc/trafficserver/lua/rb-mw-mangling.lua'
  replacement: http://deployment-mediawiki14.deployment-prep.eqiad1.wikimedia.cloud
  target: /
  type: map

This tells me that Action API requests are routed to deployment-mediawiki13 and all otherwise unconfigured URLs are routed to deployment-mediawiki14.

There is also a Horizon managed appservers.svc.deployment-prep.eqiad1.wikimedia.cloud. DNS entry which is used in a number of configuration locations needing a MediaWiki host. This record is currently a CNAME for deployment-mediawiki13.deployment-prep.eqiad1.wikimedia.cloud.

Mentioned in SAL (#wikimedia-releng) [2024-12-02T22:27:53Z] <bd808> Set ATS default MediaWiki backend to deployment-mediawiki81.deployment-prep.eqiad1.wikimedia.cloud via "deployment-cache-text" prefix hiera rules in Horizon (T378752)

Mentioned in SAL (#wikimedia-releng) [2024-12-02T22:57:17Z] <bd808> Reverted ATS default MediaWiki backend to deployment-mediawiki14.deployment-prep.eqiad1.wikimedia.cloud via "deployment-cache-text" prefix hiera rules in Horizon (T378752)

With some help from @thcipriani the PHP 8.1 test was a success. The deployment-mediawiki81.deployment-prep.eqiad1.wikimedia.cloud instance ran MediaWiki without any obvious hard crashes. The log spam seen in the ELK stack did not seem to be out of the ordinary. The selenium-daily-beta-MediaWiki suite ran to success.

Next up:

  • Remove "[WIP]" label from Puppet patch enabling PHP 8.1 selection
  • Get patch landed
  • Configure hiera settings to upgrade MediaWiki role boxes to PHP 8.1
  • Profit!

Change #1098647 abandoned by BryanDavis:

[operations/puppet@production] deployment-prep: Add PHP 8.1 appservers

Reason:

Smoke tests worked; No longer needed

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

The PCC reports for the patch have diffs like this for various prod hosts:

--- Php::Extension[yaml].orig
+++ Php::Extension[yaml]

@@
-    package_overrides => {'7.4': 'php7.4-yaml'}
+    package_overrides => {'7.4': 'php7.4-yaml', '8.1': 'php8.1-yaml'}

Folks are 99.9% sure this is fine, but also reasonably cautious about potential fallout in the remaining bare metal production MediaWiki hosts during the last couple weeks of the calendar year. The patch has been cherry-picked in deployment-prep for weeks now, so I am confident in moving forward with using it there. We can land the patch to ops/puppet.git in early January when we are less concerned about disrupting folks holidays for strange edge cases that we might not have thought about.

Mentioned in SAL (#wikimedia-releng) [2024-12-16T21:06:08Z] <bd808> Doing in-place PHP 8.1 upgrade on deployment-snapshot05.deployment-prep.eqiad1.wikimedia.cloud (T378752)

Notes from deployment-snapshot05.deployment-prep.eqiad1.wikimedia.cloud:

  • Added hiera settings to instance config via Horizon.
$ sudo -i run-puppet-agent
  # no changes
$ php --version
PHP 7.4.33 (cli) (built: Apr 18 2024 14:41:42) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies
$ sudo -i run-puppet-agent
  # saw some warnings about missing packages.
Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install php8.1-cli' returned 100: Reading package lists...
Building dependency tree...                                                     
Reading state information...
E: Unable to locate package php8.1-cli                                          
E: Couldn't find any package by glob 'php8.1-cli'
E: Couldn't find any package by regex 'php8.1-cli'
...
Notice: /Stage[main]/Php::Fpm/File[/etc/php/8.1/fpm/php-fpm.conf]: Dependency Package[php8.1-fpm] has failures: true
Warning: /Stage[main]/Php::Fpm/File[/etc/php/8.1/fpm/php-fpm.conf]: Skipping because of failed dependencies
  # seems to be a dependency order problem because eventually we see the component added as would have been expected before the first apt run
...
Notice: /Stage[main]/Profile::Mediawiki::Php/Apt::Package_from_component[wikimedia-php81]/Apt::Repository[repository_wikimedia-php81]/File[/etc/apt/sources.list.d/repository_wikimedia-php81.list]/ensure: defined content as '{sha256}f6a9310fa9ca1920c0e7c0630149a6c709c29638d31898f2f860568b3a2f1fb4'
...
Notice: Applied catalog in 55.95 seconds
$ sudo -i run-puppet-agent
  # second run made things look much better
...
Notice: Applied catalog in 77.25 seconds
$ php --version
Warning: Module "tideways_xhprof" is already loaded in Unknown on line 0
PHP 8.1.31 (cli) (built: Nov 21 2024 21:07:42) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.31, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.31, Copyright (c), by Zend Technologies
$ sudo -i run-puppet-agent
Info: Using environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for deployment-snapshot05.deployment-prep.eqiad1.wikimedia.cloud
Info: Applying configuration version '(51a18fb309) gitpuppet - MediaWiki: Only proxy existing .php files, otherwise return nice 404'
Notice: /Stage[main]/Php/File[/etc/php/8.1/cli/conf.d/20-tideways.ini]/ensure: removed
Notice: /Stage[main]/Php/File[/etc/php/8.1/cli/conf.d/20-wmerrors.ini]/ensure: removed
Notice: /Stage[main]/Php/File[/etc/php/8.1/fpm/conf.d/20-tideways.ini]/ensure: removed
Notice: Applied catalog in 9.64 seconds
$ sudo -i run-puppet-agent
  # no changes
Notice: Applied catalog in 10.02 seconds
$ php --version
PHP 8.1.31 (cli) (built: Nov 21 2024 21:07:42) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.31, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.31, Copyright (c), by Zend Technologies

Mentioned in SAL (#wikimedia-releng) [2024-12-16T22:31:16Z] <bd808> Doing in-place PHP 8.1 upgrade on deployment-parsoid14.deployment-prep.eqiad1.wikimedia.cloud (T378752)

Notes from deployment-parsoid14.deployment-prep.eqiad1.wikimedia.cloud:

  • The fix in PS14 was not sufficient. It still took 3 puppet runs to reach stable state. The next package the first git run wanted was php8.1-fpm.
bd808 renamed this task from Figure out how to install PHP 8.1 on bullseye MediaWiki instances to Install PHP 8.1 on deplopyment-prep bullseye MediaWiki instances.Dec 17 2024, 12:30 AM
bd808 edited projects, added OKR-Work; removed Spike.

Mentioned in SAL (#wikimedia-releng) [2024-12-17T16:55:22Z] <bd808> Doing in-place PHP 8.1 upgrade on deployment-mwmaint03.deployment-prep.eqiad1.wikimedia.cloud (T378752)

Notes from deployment-mwmaint03.deployment-prep.eqiad1.wikimedia.cloud:

  • Stable state after 2 puppet runs now. The first run leaves these files to be cleaned by the second run:
Notice: /Stage[main]/Php/File[/etc/php/8.1/cli/conf.d/20-tideways.ini]/ensure: removed
Notice: /Stage[main]/Php/File[/etc/php/8.1/cli/conf.d/20-wmerrors.ini]/ensure: removed
Notice: /Stage[main]/Php/File[/etc/php/8.1/fpm/conf.d/20-tideways.ini]/ensure: removed

This seems to be an artifact of how the ::php::extension class interacts with deb package provided ini files. I am not sure that it is really worth anyone's time to eliminate this minor config churn.

Mentioned in SAL (#wikimedia-releng) [2024-12-17T17:09:27Z] <bd808> Doing in-place PHP 8.1 upgrade on deployment-jobrunner05.deployment-prep.eqiad1.wikimedia.cloud (T378752)

Mentioned in SAL (#wikimedia-releng) [2024-12-17T17:20:47Z] <bd808> Doing in-place PHP 8.1 upgrade on deployment-mediawiki14.deployment-prep.eqiad1.wikimedia.cloud (T378752)

Mentioned in SAL (#wikimedia-releng) [2024-12-17T17:27:41Z] <bd808> Doing in-place PHP 8.1 upgrade on deployment-mediawiki13.deployment-prep.eqiad1.wikimedia.cloud (T378752)

Mentioned in SAL (#wikimedia-releng) [2024-12-17T17:42:57Z] <bd808> Doing in-place PHP 8.1 upgrade on deployment-mediawiki13.deployment-prep.eqiad1.wikimedia.cloud (T378752)

Mentioned in SAL (#wikimedia-releng) [2024-12-17T17:43:50Z] <bd808> Doing in-place PHP 8.1 upgrade on deployment-deploy04.deployment-prep.eqiad1.wikimedia.cloud (T378752)

Aklapper renamed this task from Install PHP 8.1 on deplopyment-prep bullseye MediaWiki instances to Install PHP 8.1 on deployment-prep bullseye MediaWiki instances.Dec 17 2024, 5:52 PM

Mentioned in SAL (#wikimedia-releng) [2024-12-17T18:39:44Z] <bd808> Setting PHP 8.1 hiera config at the global level via Horizon (T378752)

Mentioned in SAL (#wikimedia-releng) [2024-12-17T20:51:40Z] <bd808> Removed per-instance PHP 8.1 hiera config used during rollout via Horizon (T378752)

Mentioned in SAL (#wikimedia-releng) [2024-12-17T20:53:07Z] <bd808> Deleted deployment-mediawiki81 testing instance (T378752)

bd808 changed the subtype of this task from "Spike" to "Feature Request".Dec 17 2024, 9:14 PM

This work is complete except for waiting on the merge of https://gerrit.wikimedia.org/r/c/operations/puppet/+/1085471 into the operations/puppet.git repo. Folks were reasonably concerned about merging that at the end of December with a long break for most immediately following. The month of January has now passed without finding a time to do it either.

Change #1118095 had a related patch set uploaded (by Clément Goubert; author: Clément Goubert):

[operations/puppet@production] Wmflib::Php_version: Support php 8.1

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

Change #1118095 had a related patch set uploaded (by Clément Goubert; author: Clément Goubert):

[operations/puppet@production] Wmflib::Php_version: Support php 8.1

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

This is a partial replacement for my https://gerrit.wikimedia.org/r/c/operations/puppet/+/1085471 patch that has been waiting for SREs to merge since mid December.

Change #1118095 had a related patch set uploaded (by Clément Goubert; author: Clément Goubert):

[operations/puppet@production] Wmflib::Php_version: Support php 8.1

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

This is a partial replacement for my https://gerrit.wikimedia.org/r/c/operations/puppet/+/1085471 patch that has been waiting for SREs to merge since mid December.

Sorry I wasn't aware of that patch when I wrote mine. I'm not going to merge it today because Friday, and next week all of SRE is offsite, so it's unlikely I will do it then. I will schedule it for review and merge when everybody's back.

Change #1118095 abandoned by Clément Goubert:

[operations/puppet@production] Wmflib::Php_version: Support php 8.1

Reason:

Duplicates Ifab1be8e8e7b634e8875c597b586e6d69496b476

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

Change #1085471 merged by Clément Goubert:

[operations/puppet@production] php: Allow provisioning MediaWiki with PHP 8.1

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