[Resolved] La migration 0021_migrate_to_bullseye a échoué: Failed to reinstall mariadb-common

Mon serveur YunoHost

Matériel: (récupération)
ASUS M2N 68 AM PLUS
AMD Sempron 140 (amd64)
4Go Ram
HDD 500Go

Version de YunoHost: 4.4.2.14
J’ai accès à mon serveur : En SSH | Par la webadmin
Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : non

Description du problème

J’ai lancé la migration vers ynh11 et j’ai une erreur dont voici les logs complets
Mais globalement, c’est la réinstallation de mariadb qui pêche.

https://paste.yunohost.org/raw/nabekuxeqa

ended_at: 2022-09-28 22:48:14.741077
error: "La migration 0021_migrate_to_bullseye a \xE9chou\xE9 avec l'exception Failed\
  \ to reinstall mariadb-common ? : annulation"
interface: api
operation: tools_migrations_migrate_forward
parent: null
started_at: 2022-09-28 22:47:46.796067
success: false
yunohost_version: 4.4.2.14

============

2022-09-29 00:47:46,832: INFO - Exécution de la migration 0021_migrate_to_bullseye...
2022-09-29 00:47:46,844: INFO - Récupération des mises à jour disponibles pour les paquets du système...
2022-09-29 00:47:47,098: DEBUG - Hit:1 http://security.debian.org/debian-security buster/updates InRelease
2022-09-29 00:47:47,099: DEBUG - Hit:2 http://forge.yunohost.org/debian buster InRelease
2022-09-29 00:47:47,107: DEBUG - Hit:3 https://packages.sury.org/php buster InRelease
2022-09-29 00:47:47,118: DEBUG - Hit:4 http://ftp.debian.org/debian buster InRelease
2022-09-29 00:47:47,136: DEBUG - Hit:5 http://ftp.debian.org/debian buster-updates InRelease
2022-09-29 00:47:49,112: DEBUG - Reading package lists...
2022-09-29 00:47:50,538: DEBUG - Terminé
2022-09-29 00:47:50,538: INFO - Il n'y a rien à faire. Tout est déjà à jour.
2022-09-29 00:47:50,947: INFO - Démarrage de la migration vers Bullseye
2022-09-29 00:47:52,084: INFO - Mise à jour du fichier sources.lists...
2022-09-29 00:47:55,552: INFO - Récupération des mises à jour disponibles pour les paquets du système...
2022-09-29 00:47:55,648: DEBUG - Get:1 http://forge.yunohost.org/debian bullseye InRelease [18.4 kB]
2022-09-29 00:47:55,672: DEBUG - Get:2 http://ftp.debian.org/debian bullseye InRelease [116 kB]
2022-09-29 00:47:55,672: DEBUG - Get:3 http://security.debian.org/debian-security bullseye-security InRelease [48.4 kB]
2022-09-29 00:47:55,692: DEBUG - Get:4 https://packages.sury.org/php bullseye InRelease [6841 B]
2022-09-29 00:47:55,720: DEBUG - Get:5 http://ftp.debian.org/debian bullseye-updates InRelease [44.1 kB]
2022-09-29 00:47:55,820: DEBUG - Get:6 http://forge.yunohost.org/debian bullseye/stable amd64 Packages [4162 B]
2022-09-29 00:47:55,977: DEBUG - Get:7 http://security.debian.org/debian-security bullseye-security/non-free Sources [632 B]
2022-09-29 00:47:55,998: DEBUG - Get:8 http://security.debian.org/debian-security bullseye-security/main Sources [159 kB]
2022-09-29 00:47:56,037: DEBUG - Get:9 http://security.debian.org/debian-security bullseye-security/main amd64 Packages [186 kB]
2022-09-29 00:47:56,089: DEBUG - Get:10 http://security.debian.org/debian-security bullseye-security/main Translation-en [117 kB]
2022-09-29 00:47:56,111: DEBUG - Get:11 http://security.debian.org/debian-security bullseye-security/non-free amd64 Packages [528 B]
2022-09-29 00:47:56,114: DEBUG - Get:12 http://security.debian.org/debian-security bullseye-security/non-free Translation-en [344 B]
2022-09-29 00:47:56,239: DEBUG - Get:13 https://packages.sury.org/php bullseye/main amd64 Packages [337 kB]
2022-09-29 00:47:56,450: DEBUG - Get:14 http://ftp.debian.org/debian bullseye/main Sources [8633 kB]
2022-09-29 00:47:58,561: DEBUG - Get:15 http://ftp.debian.org/debian bullseye/contrib Sources [43.2 kB]
2022-09-29 00:47:58,581: DEBUG - Get:16 http://ftp.debian.org/debian bullseye/main amd64 Packages [8184 kB]
2022-09-29 00:48:00,597: DEBUG - Get:17 http://ftp.debian.org/debian bullseye/main Translation-fr [2433 kB]
2022-09-29 00:48:01,110: DEBUG - Get:18 http://ftp.debian.org/debian bullseye/main Translation-en [6239 kB]
2022-09-29 00:48:02,586: DEBUG - Get:19 http://ftp.debian.org/debian bullseye/contrib amd64 Packages [50.6 kB]
2022-09-29 00:48:02,594: DEBUG - Get:20 http://ftp.debian.org/debian bullseye/contrib Translation-en [46.9 kB]
2022-09-29 00:48:02,594: DEBUG - Get:21 http://ftp.debian.org/debian bullseye-updates/main Sources [3588 B]
2022-09-29 00:48:02,596: DEBUG - Get:22 http://ftp.debian.org/debian bullseye-updates/main amd64 Packages [6344 B]
2022-09-29 00:48:02,596: DEBUG - Get:23 http://ftp.debian.org/debian bullseye-updates/main Translation-en [5890 B]
2022-09-29 00:48:05,543: DEBUG - Fetched 26.7 MB in 10s (2713 kB/s)
2022-09-29 00:48:06,766: DEBUG - Reading package lists...
2022-09-29 00:48:08,218: DEBUG - Terminé
2022-09-29 00:48:08,855: INFO - Application du correctif pour contourner le problème de conflit...
2022-09-29 00:48:08,893: DEBUG - Running: sed -i /var/lib/dpkg/status -e 's@Conflicts: apache2, bind9, dovecot-core (>= 1:2.3.7), fail2ban (>= 0.11), iptables (>= 1.8.3), iptables-persistent, nginx-extras (>= 1.16), openssl (>= 1.1.1o), redis-server (>= 5:5.1), slapd (>= 2.4.49)@Conflicts: apache2, bind9@g'
2022-09-29 00:48:08,946: DEBUG - force-clearing old conf hash for /etc/mysql/my.cnf in category mysql
2022-09-29 00:48:09,012: DEBUG - Running: LC_ALL=C DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none apt install --quiet -o=Dpkg::Use-Pty=0 --fix-broken --assume-yes mariadb-common --reinstall -o Dpkg::Options::='--force-confmiss'
2022-09-29 00:48:09,025: DEBUG - 
2022-09-29 00:48:09,026: WARNING - WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
2022-09-29 00:48:09,027: DEBUG - 
2022-09-29 00:48:09,594: INFO - + Reading package lists...
2022-09-29 00:48:09,858: INFO - + Building dependency tree...
2022-09-29 00:48:09,860: INFO - + Reading state information...
2022-09-29 00:48:10,386: INFO - + The following packages will be upgraded:
2022-09-29 00:48:10,388: INFO - +   mariadb-common
2022-09-29 00:48:10,461: INFO - + 1 upgraded, 0 newly installed, 0 to remove and 858 not upgraded.
2022-09-29 00:48:10,461: INFO - + Need to get 36.7 kB of archives.
2022-09-29 00:48:10,462: INFO - + After this operation, 6144 B of additional disk space will be used.
2022-09-29 00:48:10,462: INFO - + Get:1 http://ftp.debian.org/debian bullseye/main amd64 mariadb-common all 1:10.5.15-0+deb11u1 [36.7 kB]
2022-09-29 00:48:11,166: INFO - + Fetched 36.7 kB in 0s (662 kB/s)
2022-09-29 00:48:11,457: DEBUG - (Reading database ... 61534 files and directories currently installed.)
2022-09-29 00:48:11,465: DEBUG - Preparing to unpack .../mariadb-common_1%3a10.5.15-0+deb11u1_all.deb ...
2022-09-29 00:48:11,622: INFO - + Unpacking mariadb-common (1:10.5.15-0+deb11u1) over (1:10.3.36-0+deb10u1) ...
2022-09-29 00:48:12,166: INFO - + Setting up mariadb-common (1:10.5.15-0+deb11u1) ...
2022-09-29 00:48:12,222: DEBUG - 
2022-09-29 00:48:12,222: DEBUG - Configuration file '/etc/mysql/mariadb.cnf', does not exist on system.
2022-09-29 00:48:12,222: DEBUG - Installing new config file as you requested.
2022-09-29 00:48:12,765: DEBUG - update-alternatives: warning: forcing reinstallation of alternative /etc/mysql/mariadb.cnf because link group my.cnf is broken
2022-09-29 00:48:13,019: INFO - + Processing triggers for mariadb-server-10.3 (1:10.3.36-0+deb10u1) ...
2022-09-29 00:48:13,263: WARNING - postinst called with unknown argument 'triggered'
2022-09-29 00:48:13,396: WARNING - dpkg: error processing package mariadb-server-10.3 (--configure):
2022-09-29 00:48:13,397: WARNING -  installed mariadb-server-10.3 package post-installation script subprocess returned error exit status 1
2022-09-29 00:48:13,501: WARNING - Errors were encountered while processing:
2022-09-29 00:48:13,503: WARNING -  mariadb-server-10.3
2022-09-29 00:48:13,738: WARNING - E: Sub-process /usr/bin/dpkg returned an error code (1)
2022-09-29 00:48:14,739: ERROR - La migration 0021_migrate_to_bullseye a échoué avec l'exception Failed to reinstall mariadb-common ? : annulation
Traceback (most recent call last):
  File "/usr/lib/moulinette/yunohost/tools.py", line 944, in tools_migrations_run
    migration.run()
  File "/usr/lib/moulinette/yunohost/data_migrations/0021_migrate_to_bullseye.py", line 174, in run
    raise YunohostError("Failed to reinstall mariadb-common ?", raw_msg=True)
yunohost.utils.error.YunohostError: Failed to reinstall mariadb-common ?

Zblerg je capte pas pourquoi tout le monde à ce pb …

Que raconte : sudo apt remove mariadb-server-10.3 --dry-run ?

Je sais pas si je peux interferer ici, mais comme j’ai le meme probleme, voila ce que sudo apt remove mariadb-server-10.3 --dry-run renvoi:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 dh-autoreconf : Depends: libtool (>= 2.4.2) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

(n’hesite pas a supprimer ma reponse si tu preferes avoir un utilisateur par probleme :slight_smile: )

J’ai eu le même problème il y’a juste quelques heures, et en cherchant sur le forum, je me suis rendu compte qu’il y’a plein de posts avec cette même erreur finale à propos de mariadb-common, j’arrive pas à comprendre si c’est toujours le même soucis, parce qu’à chaque fois les logs semblent un peu différents (à mes yeux).
Pour moi perso, c’était vraiment très court, quelques secondes, la migration n’a même pas démarré en fait et ça a retourné ça:

Info: Running migration 0021_migrate_to_bullseye...
Info: Fetching available upgrades for system packages...
Info: Nothing to do. Everything is already up-to-date.
Info: Starting migration to Bullseye
Info: Patching the sources.lists...
Info: Fetching available upgrades for system packages...
Info: Applying patch to workaround conflict issue...
Warning: WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Info: + Reading package lists...
Info: + Building dependency tree...
Info: + Reading state information...
Info: + The following package was automatically installed and is no longer required:
Info: +   linux-image-4.19.0-18-amd64
Info: + Use 'sudo apt autoremove' to remove it.
Info: + The following packages will be upgraded:
Info: +   mariadb-common
Info: + 1 upgraded, 0 newly installed, 0 to remove and 793 not upgraded.
Info: + Need to get 36.7 kB of archives.
Info: + After this operation, 6144 B of additional disk space will be used.
Info: + Get:1 http://deb.debian.org/debian bullseye/main amd64 mariadb-common all 1:10.5.15-0+deb11u1 [36.7 kB]
Info: + Fetched 36.7 kB in 0s (645 kB/s)
Info: + Unpacking mariadb-common (1:10.5.15-0+deb11u1) over (1:10.3.36-0+deb10u1) ...
Info: + Setting up mariadb-common (1:10.5.15-0+deb11u1) ...
Info: + Processing triggers for mariadb-server-10.3 (1:10.3.36-0+deb10u1) ...
Warning: postinst called with unknown argument 'triggered'
Warning: dpkg: error processing package mariadb-server-10.3 (--configure):
Warning:  installed mariadb-server-10.3 package post-installation script subprocess returned error exit status 1
Warning: Errors were encountered while processing:
Warning:  mariadb-server-10.3
Warning: E: Sub-process /usr/bin/dpkg returned an error code (1)
Error: Migration 0021_migrate_to_bullseye did not complete, aborting. Error: Failed to reinstall mariadb-common ?

Dans un autre post, quelqu’un disait qu’il avait juste relancé la commande de migration. Je l’ai fait, et effectivement la migration s’est fait sans souci apparemment.

Juste pour ajouter mon expérience, au cas où elle sert à quelque chose pour comprendre ce qui se passe.

Explications:
Migration to YNH11 runs great, but not every time: MariaDB issue - #5 by tituspijean

Effectivement ! :tada:

(I’m wondering if we couldn’t just tell apt to also remove mariadb-server-10.3 while installing/upgrading mariadb-common considering it’s supposed to be replaced with mariadb-server-10.5

1 Like

~# sudo apt remove mariadb-server-10.3 --dry-run
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
Certains paquets ne peuvent être installés. Ceci peut signifier
que vous avez demandé l'impossible, ou bien, si vous utilisez
la distribution unstable, que certains paquets n'ont pas encore
été créés ou ne sont pas sortis d'Incoming.
L'information suivante devrait vous aider à résoudre la situation : 

Les paquets suivants contiennent des dépendances non satisfaites :
 yunohost : Dépend: equivs mais ne sera pas installé
E: Erreur, pkgProblem::Resolve a généré des ruptures, ce qui a pu être causé par les paquets devant être gardés en l'état.

En effet je viens de retester

1ère execution : fail
2nde execution : success

:thinking:

1 Like

Je passe le sujet en Résolu, mais il faudra conserver en mémoire ce «bug»

Alors comme c’est le premier sujet qui est sortie quand j’ai tapé l’erreur sur le forum, je me permet de re-répondre :slightly_smiling_face:
La solution expliquée dans le post en anglais est simplement de relancer la migration, ça résout le problème

Bonjour,
j’ai eu le même message d’erreurs à la migration, et je donne plus bas ce qui à solutionner mon problème pour pouvoir migrer (si cela peu servir à d’autre) :

Message :

La migration 0021_migrate_to_bullseye a échoué avec l'exception Failed to reinstall mariadb-common ?

Mais le redémarrage cité plus haut dans ce fil n’a rien résolu. Sur la base de mes messages d’erreurs :

Package proftpd-mod-crypto is not configured yet.
dpkg: error processing package proftpd-basic (--configure):
dependency problems - leaving unconfigured
+ Processing triggers for mariadb-server-10.5 (1:10.5.15-0+deb11u1) ...
Errors were encountered while processing:
proftpd-core
proftpd-mod-crypto
proftpd-mod-wrap
proftpd-basic

J’ai résolu le problème en suivant ce fil :

package proftpd-core 1.3.7a+dfsg-12 failed to install/upgrade

et en réinstallant proftpd :

sudo apt remove proftpd*
sudp apt purge proftpd*
sudo apt-get install proftpd*
sudo service proftpd start

La migration à pu s’achever sans problème.

Encore merci à tous les contributeurs de ce super projet Yunohost !

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.