Page MenuHomePhabricator

Upgrade wmch-mores-testing server from Debian 10 to Debian 12 stable (PHP 8.2) - in 2 steps
Closed, ResolvedPublic

Description

Finally we can upgrade the operating system of wmch-mores-demo-testing from Debian 11 from Debian 10 (EOL) to Debian 11 (oldstable) to Debian 12 (current stable) reaching PHP 8.2.

https://packages.debian.org/bookworm/php

Documentation:

https://members.wikimedia.ch/wiki/Infrastructure/Servers/List

WARNING: The documentation was wrong https://members.wikimedia.ch/wiki/Infrastructure/Servers/List this server is Debian 10, not Debian 11 - fixed (2025-03-28)

Stuff:

Event Timeline

I have a confirmation that server snapshot was completed. Let's start.

apt update has the usual backports offline. I will use the archive.

Get:1 http://security.debian.org/debian-security buster/updates InRelease [34.8 kB]
Ign:2 http://deb.debian.org/debian buster-backports InRelease                  
Hit:3 http://deb.debian.org/debian buster InReleasetor.wikimedia.org/T390275
Err:4 http://deb.debian.org/debian buster-backports Release                    
  404  Not Found [IP: 151.101.194.132 80]
Get:5 http://security.debian.org/debian-security buster/updates/main amd64 Packages [610 kB]
Get:6 http://security.debian.org/debian-security buster/updates/main Translation-en [330 kB]
Get:7 http://security.debian.org/debian-security buster/updates/contrib amd64 Packages [3460 B]
Get:8 http://security.debian.org/debian-security buster/updates/contrib Translation-en [1488 B]
Reading package lists... Done                                    
E: The repository 'http://deb.debian.org/debian buster-backports Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Adopted archive version

-deb http://deb.debian.org/debian/ buster-backports main
+deb http://archive.debian.org/debian buster-backports main

This is a demo server, not used in any production, so we can be very cautious.

systemctl stop apache2.service parsoid.service wmch-wiki-minipedia.service memcached.service
SHOW FULL PROCESSLIST;
+-----+-------------+-----------+------+---------+------+--------------------------+-----------------------+----------+
| Id  | User        | Host      | db   | Command | Time | State                    | Info                  | Progress |
+-----+-------------+-----------+------+---------+------+--------------------------+-----------------------+----------+
|   1 | system user |           | NULL | Daemon  | NULL | InnoDB purge worker      | NULL                  |    0.000 |
|   3 | system user |           | NULL | Daemon  | NULL | InnoDB purge worker      | NULL                  |    0.000 |
|   4 | system user |           | NULL | Daemon  | NULL | InnoDB purge coordinator | NULL                  |    0.000 |
|   2 | system user |           | NULL | Daemon  | NULL | InnoDB purge worker      | NULL                  |    0.000 |
|   5 | system user |           | NULL | Daemon  | NULL | InnoDB shutdown handler  | NULL                  |    0.000 |
| 953 | root        | localhost | NULL | Query   |    0 | Init                     | SHOW FULL PROCESSLIST |    0.000 |
+-----+-------------+-----------+------+---------+------+--------------------------+-----------------------+----------+
6 rows in set (0.015 sec)

No user business stuff running. Good

systemctl stop mariadb

https://www.debian.org/releases/stable/amd64/release-notes/ch-upgrading.html

$ dpkg -l | grep -E '^ii' | wc -l
638

Better than my server.

$ apt-mark showhold
<silence>

(Ah, our Zabbix was updated with maintenance flag)

8.6G available for the upgrade.

Taking official sources

https://wiki.debian.org/SourcesList

(Now Debian wiki has 500 error status page uhm - in Italy this means bad luck)

deb https://deb.debian.org/debian bookworm main
deb-src https://deb.debian.org/debian bookworm main

deb https://security.debian.org/debian-security bookworm-security main
deb-src https://security.debian.org/debian-security bookworm-security main

deb https://deb.debian.org/debian bookworm-updates main
deb-src https://deb.debian.org/debian bookworm-updates main
apt update

Checking required space

$ apt -o APT::Get::Trivial-Only=true full-upgrade
...
Need to get 381 MB of archives.
After this operation, 860 MB of additional disk space will be used.

Yes, enough space.

Let's stat. Minimal.

apt upgrade --without-new-pkgs
ValerioBoz-WMCH updated the task description. (Show Details)

I've read whole changelist as usual, promise.

$ echo $?
0

Nice. Proceeding with full

apt full-upgrade
mediawiki (1:1.39.0-1) unstable; urgency=medium

    MediaWiki has been updated to the 1.39 upstream release branch, which
    brings in two years of upstream changes since 1.39. Release notes
    may be found in /usr/share/doc/mediawiki/RELEASE-NOTES-1.39` and
    /usr/share/doc/mediawiki/changelog. Please see the "Upgrading" section
    of README.debian and /usr/share/doc/mediawiki/UPGRADE for details on
    what manual steps need to be taken to upgrade.

    Some highlights of new features:
    * New bundled extensions:
      * AbuseFilters allows administrators set specific actions to be taken
        when actions by users, such as edits or file uploads, match certain
        criteria.
      * Math lets users create mathematical formulae written in a sub-set of
        LaTeX and rendered in MathML with a fallback SVG image.
    * There is a new bundled skin, Minerva, which provides a much simpler user
      interface and is much more aggressive about optimizing for performance so
      that it can cater for mobile users.
    * The logo of MediaWiki has changed. This means that the "Powered by
      MediaWiki" button shown in the skin footer will be different.
    * Administrators now have the option to delete/undelete the associated
      "Talk" page when they are (un)deleting a given page.
    * Added support for 42 new languages.

(Thanks Taavi asd)

Not so great.

Setting up libc6:amd64 (2.36-9+deb12u10) ...
/usr/bin/perl: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory
dpkg: error processing package libc6:amd64 (--configure):
 installed libc6:amd64 package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
 libc6:amd64
Error: Timeout was reached
E: Sub-process /usr/bin/dpkg returned an error code (1)

Restoring the snapshot and trying again (internal ticket DCT-1774).

I need more sleep probably before doing this kind of simple things.

Accordingly to the Internet I've done the stupidest mistake ever, that is, trusting a task title, instead of trusting APT sources.

https://stackoverflow.com/a/77957251/3451846

ValerioBoz-WMCH renamed this task from Upgrade wmch-mores-testing server from Debian 11 to Debian 12 stable (PHP 8.2) to Upgrade wmch-mores-testing server from Debian 10 to Debian 12 stable (PHP 8.2) - in 2 steps.Mar 28 2025, 5:30 PM
ValerioBoz-WMCH updated the task description. (Show Details)

Our internal documentation was NOT CORRECT. Fixed. Marking wmch-mores-demo-testing server from "🟡 Debian 11 " to "🔴 Debian 10 buster".

https://members.wikimedia.ch/wiki/Infrastructure/Servers/List

Waiting for server snapshot restore. This will be moved in the week-end in my volunteer capacity.

Boosting right now the buster → bullseye upgrade in my volunteer capacity.

Upgrade to Debian bullseye 11 concluded successfully as usual when you know what you are doing. Doing second step upgrading to Debian 12 right now.

Just for the records, using 221MB RAM in bullseye after fresh reboot (reboot done to apply new kernel).

...and 333MB RAM in bookworm (also after reboot)