]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: fix migrations logging 65551/head
authorAdam King <adking@redhat.com>
Tue, 16 Sep 2025 20:40:23 +0000 (16:40 -0400)
committerAdam King <adking@redhat.com>
Tue, 16 Sep 2025 20:40:23 +0000 (16:40 -0400)
This was logging "running migration" every
single iteration of the serve loop previously
as we always call migrate even if there are
no migrations to do. This commit moves that
logging to log only when doing a migration and
includes which numeric migration is happening

Signed-off-by: Adam King <adking@redhat.com>
src/pybind/mgr/cephadm/migrations.py

index f664897f35f3b68eda9ad025462a91314d00212c..64e39d9343286ba1c567d29bd0e06a28568b3fa3 100644 (file)
@@ -86,41 +86,48 @@ class Migrations:
                 "cephadm migration still ongoing. Please wait, until the migration is complete.")
 
     def migrate(self, startup: bool = False) -> None:
-        logger.info('running migrations')
-
         if self.mgr.migration_current == 0:
+            logger.info('Running migration 0 -> 1')
             if self.migrate_0_1():
                 self.set(1)
 
         if self.mgr.migration_current == 1:
+            logger.info('Running migration 1 -> 2')
             if self.migrate_1_2():
                 self.set(2)
 
         if self.mgr.migration_current == 2 and not startup:
+            logger.info('Running migration 2 -> 3')
             if self.migrate_2_3():
                 self.set(3)
 
         if self.mgr.migration_current == 3:
+            logger.info('Running migration 3 -> 4')
             if self.migrate_3_4():
                 self.set(4)
 
         if self.mgr.migration_current == 4:
+            logger.info('Running migration 4 -> 5')
             if self.migrate_4_5():
                 self.set(5)
 
         if self.mgr.migration_current == 5:
+            logger.info('Running migration 5 -> 6')
             if self.migrate_5_6():
                 self.set(6)
 
         if self.mgr.migration_current == 6:
+            logger.info('Running migration 6 -> 7')
             if self.migrate_6_7():
                 self.set(7)
 
         if self.mgr.migration_current == 7:
+            logger.info('Running migration 7 -> 8')
             if self.migrate_7_8():
                 self.set(8)
 
         if self.mgr.migration_current == 8:
+            logger.info('Running migration 8 -> 9')
             if self.migrate_8_9():
                 self.set(9)