Skip to content

Commit 0874208

Browse files
vaibhavhdmssonicbld
authored andcommitted
[fast-reboot] Fix regression: set FAST_REBOOT state_db flag to support fast-reboot from older images (#16733)
Why I did it Fix: #16699 Fast reboot is failing from old OS versions (eg., 201911 image) to latest (eg., master branch) after PR #15685 The system wide flag for FAST_REBOOT is still required when the base OS version does not support the new fast-reboot reconciliation logic (no db dump)
1 parent 4e865e9 commit 0874208

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

files/build_templates/docker_image_ctl.j2

+6
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,12 @@ function postStartAction()
247247
$SONIC_CFGGEN -j /etc/sonic/config_db$DEV.json --write-to-db
248248
fi
249249
fi
250+
251+
if [[ "$BOOT_TYPE" == "fast" ]]; then
252+
# this is the case when base OS version does not support fast-reboot with reconciliation logic (dump.rdb is absent)
253+
# In this case, we need to set the flag to indicate fast-reboot is in progress. Set the key to expire in 3 minutes
254+
$SONIC_DB_CLI STATE_DB SET "FAST_REBOOT|system" "1" "EX" "180"
255+
fi
250256
fi
251257

252258
if [ -e /tmp/pending_config_migration ] || [ -e /tmp/pending_config_initialization ]; then

0 commit comments

Comments
 (0)