[Resolu] 17. Migrate databases from PostgreSQL 9.6 to 11 : There is no migration called 'run' | Error 404

Mon serveur YunoHost

Matériel: VM distante
Version de YunoHost: YunoHost 4.2.5.3
J’ai accès à mon serveur : En SSH | Par la webadmin | En direct avec un clavier/écran → OUI
Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : non

Description du problème

Bonjour,

J’ai lancé la migration 15 vers Buster. Tout s’est bien déroulé.
Je constate également que les migration 16, 18, 19, et 20 ont été effectuées.

Je constate cependant que la migration "17. Migrate databases from PostgreSQL 9.6 to 11 " n’a pas été effectuée.
Je la lance donc manuellement, mais j’obtiens l’erreur suivante :

#### YunoHost encountered an error
**Error**: `"400" Bad Request`
**Action**: `"PUT" /yunohost/api/migrations/run?accept_disclaimer`
**Error message:**
There is no migration called 'run'

Comment opérer cette migration en toute sécurité ?

Le soucis est là [fix] Migrations api path by zamentur · Pull Request #372 · YunoHost/yunohost-admin · GitHub

Du coup faut le faire en CLI en attendant:

yunohost tools migrations migrate --accept-disclaimer

Hello @ljf ,

merci pour le retour rapide.

Voici le retour de commande que j’obtiens quand je tente via ssh :

$ sudo yunohost tools migrations migrate --accept-disclaimer
Attention : 'yunohost tools migrations migrate' est déprécié et sera bientôt supprimé, utilisez 'yunohost tools migrations run' à la place
Attention : 'yunohost tools migrations migrate' est déprécié et sera bientôt supprimé, utilisez 'yunohost tools migrations run' à la place
Info : Exécution de la migration 0017_postgresql_9p6_to_11...
Erreur : La migration 0017_postgresql_9p6_to_11 a échoué avec l’exception a bytes-like object is required, not 'str' : annulation
Info : L’opération 'Exécuter les migrations' a échoué ! Pour obtenir de l’aide, merci de partager le journal de l’opération en utilisant la commande 'yunohost log share 20210608-113931-tools_migrations_migrate_forward'

Le détail des logs ici: https://paste.yunohost.org/raw/hutihacapo

Une idée !? :slight_smile:

Yep, si tu sais éditer un fichier en cli, tu peux aller dans:
/usr/lib/moulinette/yunohost/data_migrations/0017_postgresql_9p6_to_11.py

et changer la ligne 81

out = out.strip().split("\n")

par

out = out.strip().split(b"\n")

Note: it was been fixed 4 days ago: Python3: fix string split in postgresql migration · YunoHost/yunohost@14d4cec · GitHub it will be in 4.2.5.4 .

J’attends l’upgrade dans ce cas !

Merci bcp !

Excellente journée, :wink:

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