[PSA] Upgrade impossible de mariadb-server et yunohost hébergé chez Scaleway

#1

Hello!

Pour ceux qui ont leur Yunohost hébergé chez SW, qui sont bloqués lors de l’installation de la dernière mise à jour de yunohost et de mariadb-server, et qui ont comme message d’erreur suivant :

Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mariadb-server-10.1 (10.1.37-0+deb9u1) ...
logger: socket /dev/log: Connection refused
logger: socket /dev/log: Connection refused
dpkg: error processing package mariadb-server-10.1 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mariadb-server:
 mariadb-server depends on mariadb-server-10.1 (>= 10.1.37-0+deb9u1); however:
  Package mariadb-server-10.1 is not configured yet.
 
dpkg: error processing package mariadb-server (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of yunohost:
 yunohost depends on mariadb-server; however:
  Package mariadb-server is not configured yet.
 
dpkg: error processing package yunohost (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of yunohost-admin:
 yunohost-admin depends on yunohost (>= 2.7.6); however:
  Package yunohost is not configured yet.
 
dpkg: error processing package yunohost-admin (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mariadb-server-10.1
 mariadb-server
 yunohost
 yunohost-admin

Il semblerait que Scaleway modifie le machine-id sur leurs kernels, et que ça crée des problèmes avec le logger systemd.
Par exemple, j’avais le machine-id suivant :

root@lovelace:~# cat /etc/machine-id 
26da2c29c6a545fd9af95d29ca9b5a5a
9a5

Après avoir cherché pendant des heures, j’ai enfin trouvé la solution (ici), il suffit de supprimer la deuxième ligne pour n’avoir plus que :

root@lovelace:~# cat /etc/machine-id 
26da2c29c6a545fd9af95d29ca9b5a5a

Après un petit nettoyage des logs systemd :

SYSTEMD_LOG_LEVEL=debug systemd-tmpfiles --create --clean --remove

Et enfin un redémarrage du service de log systemd :

systemctl restart systemd-journald.service
systemctl restart systemd-journald.socket

Et zou, l’upgrade est possible et fonctionne sans aucun soucis :slight_smile:

root@lovelace:~# apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up mariadb-server-10.1 (10.1.37-0+deb9u1) ...
Setting up mariadb-server (10.1.37-0+deb9u1) ...
Setting up yunohost (3.3.1) ...
Regenerating configuration, this might take a while...
Success! The configuration has been updated for service 'metronome'
Warning: The configuration file '/etc/nginx/conf.d/mydomain.com.conf' has been manually modified and will not be updated
Warning: The configuration file '/etc/nginx/conf.d/yunohost_admin.conf' has been manually modified and will not be updated
Success! The configuration has been updated for service 'dnsmasq'
Warning: The configuration file '/etc/fail2ban/jail.conf' has been manually modified and will not be updated
Success! The configuration has been updated for service 'slapd'
Launching migrations..
Warning: Migration 6 sync_admin_and_root_passwords has to be ran manually. Please go to Tools >                 
Migrations on the webadmin, or run `yunohost tools migrations migrate`.
Restarting YunoHost firewall...
Setting up yunohost-admin (3.3.1) ...
W: APT had planned for dpkg to do more than it reported back (9 vs 13).
Affected packages: mariadb-server-10.1:amd64

Je dois pas être le seul à avoir eu ce soucis, donc je profite pour partager

8 Likes
Please Help mon yunohost et semi mort
#2

Merci eeeple pour ton post, ça m’a grandement aidé ! Note: il faut set machine-id en write pour l’éditer.

Ça m’a permis de passer le problème maria-db, mais l’upgrade casse plus loin.
Une idée ?
Mathieu

root@scw-f66613:/etc# sudo apt upgrade
Reading package lists… Done
Building dependency tree
Reading state information… Done
Calculating upgrade… Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up postsrsd (1.4-1) …
/var/lib/dpkg/info/postsrsd.config: 15: /etc/default/postsrsd: leclaire.re: not found
dpkg: error processing package postsrsd (–configure):
subprocess installed post-installation script returned error exit status 127
dpkg: dependency problems prevent configuration of yunohost:
yunohost depends on postsrsd; however:
Package postsrsd is not configured yet.
dpkg: error processing package yunohost (–configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of yunohost-admin:
yunohost-admin depends on yunohost (>= 2.7.6); however:
Package yunohost is not configured yet.
dpkg: error processing package yunohost-admin (–configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
postsrsd
yunohost
yunohost-admin
E: Sub-process /usr/bin/dpkg returned an error code (1)

#3

Hello !
Les domaines sont bien déclarés dans l’interface d’admin ?
Pour info, voici ma conf de /etc/default/postsrsd :

# Default settings for postsrsd                                                                                                                                                                                    
# Local domain name.                                                                                                                                                                                               
# Addresses are rewritten to originate from this domain. The default value                                                                                                                                         
# is taken from `postconf -h mydomain` and probably okay.                                                                                                                                                          
#                                                                                                                                                                                                                  
SRS_DOMAIN=mydomain.com                                                                                                                                                                                            
                                                                                                                                                                                                                   
# Exclude additional domains.                                                                                                                                                                                      
# You may list domains which shall not be subjected to address rewriting.                                                                                                                                          
# If a domain name starts with a dot, it matches all subdomains, but not                                                                                                                                           
# the domain itself. Separate multiple domains by space or comma.                                                                                                                                                  
# We have to put some "dummy" stuff at start and end... see this comment :                                                                                                                                         
# https://github.com/roehling/postsrsd/issues/64#issuecomment-284003762                                                                                                                                            
SRS_EXCLUDE_DOMAINS=dummy mydomain.com  dummy                                                                                                                                                              
                                                                                                                                                                                                                   
# First separator character after SRS0 or SRS1.                                                                                                                                                                    
# Can be one of: -+=                                                                                                                                                                                               
SRS_SEPARATOR==                                                                                                                                                                                                    
                                                                                                                                                                                                                   
# Secret key to sign rewritten addresses.                                                                                                                                                                          
# When postsrsd is installed for the first time, a random secret is generated                                                                                                                                      
# and stored in /etc/postsrsd.secret. For most installations, that's just fine.                                                                                                                                    
#                                                                                                                                                                                                                  
SRS_SECRET=/etc/postsrsd.secret                                                                                                                                                                                    
                                                                                                                                                                                                                   
# Local ports for TCP list.                                                                                                                                                                                        
# These ports are used to bind the TCP list for postfix. If you change                                                                                                                                             
# these, you have to modify the postfix settings accordingly. The ports                                                                                                                                            
# are bound to the loopback interface, and should never be exposed on                                                                                                                                              
# the internet.                                                                                                                                                                                                    
#                                                                                                                                                                                                                  
SRS_FORWARD_PORT=10001                                                                                                                                                                                             
SRS_REVERSE_PORT=10002                                                                                                                                                                                             
                                                                                                                                                                                                                   
# Drop root privileges and run as another user after initialization.                                                                                                                                               
# This is highly recommended as postsrsd handles untrusted input.                                                                                                                                                  
#                                                                                                                                                                                                                  
RUN_AS=postsrsd                                                                                                                                                                                                    
                                                                                                                                                                                                                   
# Jail daemon in chroot environment                                                                                                                                                                                
CHROOT=/var/lib/postsrsd
#4

Oui, j’ai exacement la même config que toi

#5

Malheureusement, je ne suis pas du tout expert de postsrsd, désolé.
Il semblerait quand même que ce soit ça qui déconne et empêche la mise à jour.
Peut-être que quelqu’un d’un peu plus connaisseur pourrait t’aider.

#6

Salut,

ca semble etre un bug dans yunohost … a mon avis tu peux editer le fichier /etc/default/postsrsd et rajouter des double quotes (") autout de la valeur de SRS_EXCLUDE_DOMAINS

comme ceci :

SRS_EXCLUDE_DOMAINS="dummy mydomain.com  dummy "

puis relancer la mise a jour

2 Likes
#7

Excellent, ça marche ! C’est un problème lié à scaleway aussi ? Merci à tous les deux pour vos infos et votre temps.

#8

Hmnon, c’est plutot la faute de YunoHost pour le coup - en fait c’est bizarre que ça ai marché aussi longtemps sans qu’on s’en rende compte :stuck_out_tongue_winking_eye:

#9

Je vais corriger chez moi aussi alors, avant que ça pète :stuck_out_tongue: Merci !