Skip to content

Commit ef7780d

Browse files
authored
[fast-reboot] Fix regression: set FAST_REBOOT state_db flag to support fast-reboot from older images (#16733) (#16754)
1 parent 214ea08 commit ef7780d

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
@@ -241,6 +241,12 @@ function postStartAction()
241241
$SONIC_CFGGEN -j /etc/sonic/config_db$DEV.json --write-to-db
242242
fi
243243
fi
244+
245+
if [[ "$BOOT_TYPE" == "fast" ]]; then
246+
# this is the case when base OS version does not support fast-reboot with reconciliation logic (dump.rdb is absent)
247+
# In this case, we need to set the flag to indicate fast-reboot is in progress. Set the key to expire in 3 minutes
248+
$SONIC_DB_CLI STATE_DB SET "FAST_REBOOT|system" "1" "EX" "180"
249+
fi
244250
fi
245251

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

0 commit comments

Comments
 (0)