Migration partielle vers Stretch / Yunohost 3.x

Bonjour

Mon serveur YunoHost

Matériel: Raspberry Pi à la maison
Version de YunoHost: 2.7.14
J’ai accès à mon serveur : En SSH
Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : non

Description du problème

Après avoir résolu le pb Migration vers Stretch : repo.yunohost.org bad gateway, j’ai pu lancer la migration vers Stretch.

Migration Stretch échoue comme à Migration vers Stretch échouée : No such file or directory: '/etc/fail2ban/filter.d/yunohost.conf'

J’ai essayé de corriger, notamment :

dpkg --configure -a

apt update && apt dist-upgrade && yunohost tools update && yunohost tools upgrade --ignore-apps
Erreurs :

(Reading database ... 55591 files and directories currently installed.)
Preparing to unpack .../mariadb-server-core-10.1_10.1.47-0+deb9u1_armhf.deb ...
Unpacking mariadb-server-core-10.1 (10.1.47-0+deb9u1) ...
dpkg: error processing archive /var/cache/apt/archives/mariadb-server-core-10.1_10.1.47-0+deb9u1_armhf.deb (--unpack):
 trying to overwrite '/usr/bin/mysql_install_db', which is also in package mariadb-server-10.0 10.0.38-0+deb8u1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/mariadb-server-core-10.1_10.1.47-0+deb9u1_armhf.deb

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'root@YunoHost.(none)')
warning: etckeeper failed to commit changes in /etc using git
Error in function: 
SystemError: E:Sub-process /usr/bin/dpkg returned an error code (1)
Warning: unable to upgrade packages: installArchives() failed
Error: Unable to upgrade all of the packages

J’essaie tout de même :

yunohost tools migrations migrate --accept-disclaimer

Erreur :

root@YunoHost:~# yunohost tools migrations migrate --accept-disclaimer
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/moulinette/actionsmap.py", line 557, in process
    fromlist=[func_name],
  File "/usr/lib/moulinette/yunohost/tools.py", line 43, in <module>
    from moulinette.core import MoulinetteError, init_authenticator
ImportError: cannot import name init_authenticator
Error: An error occurred. Please see the logs for details, they are located in /var/log/yunohost/.

Problème : moulinette est en v3.8 alors que yunohost toujours en v2.7.14

root@YunoHost:~# yunohost --version
yunohost: 
  repo: now
  version: 2.7.14.5
yunohost-admin: 
  repo: now
  version: 2.7.15
moulinette: 
  repo: stable
  version: 3.8.1.3
ssowat: 
  repo: stable
  version: 3.8.0.3

Je ne sais pas trop comment m’en sortir.

Woké alors je tenterais un :

apt install --fix-broken -o Dpkg::Options::="--force-overwrite"

(même si c’est un peu yolo)

(si ça peut te rassurer je crois que j’ai eu un soucis du même genre l’autre jour dans le même genre de contexte)

Super ! Cela a résolu le pb avec mariadb, je tournais en rond s’en m’en dépêtré.

Ensuite, que dois-je faire ?

Je ferais un apt dist-upgrade

Si apt te demande en interactif si tu veux “garder l’ancienne ou la nouvelle version d’un fichier de configuration”, appuie juste sur entrée pour garder l’option par défaut

Arg, maintenant un pb avec fail2ban
J’ai laissé à N : *** jail.conf (Y/I/N/O/D/Z) [default=N]

Setting up fail2ban (0.9.6-2) ...
Installing new version of config file /etc/bash_completion.d/fail2ban ...
Installing new version of config file /etc/fail2ban/action.d/badips.conf ...
[...]
Installing new version of config file /etc/fail2ban/filter.d/wuftpd.conf ...

Configuration file '/etc/fail2ban/jail.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** jail.conf (Y/I/N/O/D/Z) [default=N] ? 
Installing new version of config file /etc/init.d/fail2ban ...
Created symlink /etc/systemd/system/multi-user.target.wants/fail2ban.service → /lib/systemd/system/fail2ban.service.
Job for fail2ban.service failed because the control process exited with error code.
See "systemctl status fail2ban.service" and "journalctl -xe" for details.
invoke-rc.d: initscript fail2ban, action "start" failed.
● fail2ban.service - Fail2Ban Service
   Loaded: loaded (/lib/systemd/system/fail2ban.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Mon 2020-12-28 21:34:30 UTC; 31ms ago
     Docs: man:fail2ban(1)
  Process: 1306 ExecStart=/usr/bin/fail2ban-client -x start (code=exited, status=255)
dpkg: error processing package fail2ban (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 fail2ban

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'root@YunoHost.(none)')
warning: etckeeper failed to commit changes in /etc using git
E: Sub-process /usr/bin/dpkg returned an error code (1)

J’ai essayé de dépanner le pb fail2ban en m’inspirant de Fail2ban : impossible de démarrer le service (failed) - #16 by AntoineC
Mais cela n’a pas marché.

apt-cache policy fail2ban
systemctl stop fail2ban
mv /etc/fail2ban /etc/fail2ban.old.2020.12.28
wget http://ftp.fr.debian.org/debian/pool/main/f/fail2ban/fail2ban_0.9.6-2_all.deb
dpkg -i --force-confmiss fail2ban_0.9.6-2_all.deb
dpkg -i --force-confmiss /var/cache/apt/archives/fail2ban*.deb

OK
Mais pb sur :

yunohost service regen-conf fail2ban --force

root@YunoHost:~# yunohost service regen-conf fail2ban --force
Success! The configuration has been updated for service 'fail2ban'
Warning: Job for fail2ban.service failed because the control process exited with error code.
Warning: See "systemctl status fail2ban.service" and "journalctl -xe" for details.
Error: 5
fail2ban: 
  applied: 
    /etc/fail2ban/filter.d/yunohost.conf: 
      status: force-created
    /etc/fail2ban/jail.conf: 
      status: force-updated
  pending: 

J’ai tenté de continuer avec :

dpkg --configure -a
apt update && apt dist-upgrade

Des difficultés avec dovecot : plusieurs heures a tenté différentes commandes. Je m’en suis sorti sans comprendre comment exactement.

Puis en reprenant :

apt update && apt dist-upgrade

Cela a finalisé la mise à jour.

yunohost tools update

root@YunoHost:~# yunohost tools update
Info: Fetching available upgrades for system packages...
Info: Updating application catalog…
Success! The application catalog has been updated!
apps: 
  current_version: 13.0.6~ynh1
  id: nextcloud
  label: Nextcloud
  new_version: 19.0.3~ynh1
system: 

yunohost tools upgrade --system

root@YunoHost:~# yunohost tools upgrade --system
Info: Nothing to do. Everything is already up-to-date.
Info: Upgrading packages...
Success! System upgraded
root@YunoHost:~# yunohost --version
yunohost: 
  repo: stable
  version: 3.8.5.9
yunohost-admin: 
  repo: stable
  version: 3.8.3.5
moulinette: 
  repo: stable
  version: 3.8.1.3
ssowat: 
  repo: stable
  version: 3.8.0.3
root@YunoHost:~# lsb_release -a
No LSB modules are available.
Distributor ID:	Raspbian
Description:	Raspbian GNU/Linux 9.13 (stretch)
Release:	9.13
Codename:	stretch

yunohost service status fail2ban yunohost-firewall : OK

Merci beaucoup @Aleks (et tous les autres articles sur le forum)

Pb Nextcloud déplacé vers Nextcloud ne fonctionne plus après migration vers Stretch

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