From 76457141db02b80abc003d00261e4c4635b83676 Mon Sep 17 00:00:00 2001 From: Aryeh Feigin <101218333+arfeigin@users.noreply.github.com> Date: Tue, 14 Mar 2023 22:13:51 +0200 Subject: [PATCH] Fix fast-reboot DB migration (#2734) Fix DB migrator logic for migrating fast-reboot table, fixing #2621 db_migrator. How I did it Checking if fast-reboot table exists in DB. How to verify it Verified manually, migrating after fast-reboot and after cold/warm reboot. --- scripts/db_migrator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/db_migrator.py b/scripts/db_migrator.py index b08c397971..64fddea290 100755 --- a/scripts/db_migrator.py +++ b/scripts/db_migrator.py @@ -874,8 +874,8 @@ def version_4_0_0(self): # reading FAST_REBOOT table can't be done with stateDB.get as it uses hget behind the scenes and the table structure is # not using hash and won't work. # FAST_REBOOT table exists only if fast-reboot was triggered. - keys = self.stateDB.keys(self.stateDB.STATE_DB, "FAST_REBOOT") - if keys is not None: + keys = self.stateDB.keys(self.stateDB.STATE_DB, "FAST_REBOOT|system") + if keys: enable_state = 'true' else: enable_state = 'false'