From f5d94509a1f9884cd16d48f0dc2f41089bbbb289 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 26 Aug 2022 19:20:13 +0200 Subject: [PATCH 1/2] bullseye migration: add trick to automagically find the likely log of a previously failed migration to ease support --- .../data_migrations/0021_migrate_to_bullseye.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py index 8c3ba8ecf..444306b8e 100644 --- a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py +++ b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py @@ -367,6 +367,16 @@ class MyMigration(Migration): not self.debian_major_version() == N_CURRENT_DEBIAN and not self.yunohost_major_version() == N_CURRENT_YUNOHOST ): + try: + # Here we try to find the previous migration log, which should be somewhat recent and be at least 10k (we keep the biggest one) + maybe_previous_migration_log_id = check_output("cd /var/log/yunohost/categories/operation && find -name '*migrate*.log -size +10k -mtime -100 -exec ls -s {} \\; | sort -n | tr './' ' ' | awk '{print $2}' | tail -n 1") + if maybe_previous_migration_log_id: + logger.info(f"NB: the previous migration log id seems to be {maybe_previous_migration_log_id}. You can share it with the support team with : sudo yunohost log share {maybe_previous_migration_log_id}") + except Exception: + # Yeah it's not that important ... it's to simplify support ... + pass + + raise YunohostError("migration_0021_not_buster2") # Have > 1 Go free space on /var/ ? From 190c1302b1b16fe8eb1433780bd5352d0f9205dc Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 26 Aug 2022 19:23:02 +0200 Subject: [PATCH 2/2] Update changelog for 4.4.2.11 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 59cda2aba..404493b7a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +yunohost (4.4.2.11) stable; urgency=low + + - bullseye migration: add trick to automagically find the likely log of a previously failed migration to ease support (f5d94509) + + -- Alexandre Aubin Fri, 26 Aug 2022 19:22:30 +0200 + yunohost (4.4.2.10) stable; urgency=low - bullseye migration: add proper explanations and advices after the damn 'The distribution is not Buster' message ... (6a594d0e)