From 435ec35f1e656516caf9e9d8d7c446d43b57129a Mon Sep 17 00:00:00 2001 From: afeigin Date: Sun, 12 Mar 2023 10:39:46 +0000 Subject: [PATCH 1/3] fix fast-reboot db-migration --- scripts/db_migrator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/db_migrator.py b/scripts/db_migrator.py index e88537fb3b..06f46bed75 100755 --- a/scripts/db_migrator.py +++ b/scripts/db_migrator.py @@ -832,7 +832,7 @@ def version_3_0_5(self): # 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: + if not keys: enable_state = 'true' else: enable_state = 'false' From 1cb1fc50f9ccca6e272ee8f6dd6d795d24d0070f Mon Sep 17 00:00:00 2001 From: Aryeh Feigin <101218333+arfeigin@users.noreply.github.com> Date: Mon, 13 Mar 2023 10:25:28 +0200 Subject: [PATCH 2/3] Update db_migrator.py --- scripts/db_migrator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/db_migrator.py b/scripts/db_migrator.py index 06f46bed75..a0668d3f9b 100755 --- a/scripts/db_migrator.py +++ b/scripts/db_migrator.py @@ -832,7 +832,7 @@ def version_3_0_5(self): # 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 not keys: + if keys: enable_state = 'true' else: enable_state = 'false' From 936736d052fda0cb13477077d5f50fb1aee47ed4 Mon Sep 17 00:00:00 2001 From: Aryeh Feigin <101218333+arfeigin@users.noreply.github.com> Date: Mon, 13 Mar 2023 19:58:36 +0200 Subject: [PATCH 3/3] fix check for fast-reboot entry --- scripts/db_migrator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/db_migrator.py b/scripts/db_migrator.py index a0668d3f9b..7576651804 100755 --- a/scripts/db_migrator.py +++ b/scripts/db_migrator.py @@ -831,7 +831,7 @@ def version_3_0_5(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") + keys = self.stateDB.keys(self.stateDB.STATE_DB, "FAST_REBOOT|system") if keys: enable_state = 'true' else: