[fast-reboot] Fix regression: set FAST_REBOOT state_db flag to support fast-reboot from older images (#16733) (#16753)

This commit is contained in:
mssonicbld 2023-09-29 05:29:20 +08:00 committed by GitHub
parent 28f011a2f0
commit 185a63bc7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -249,6 +249,12 @@ function postStartAction()
$SONIC_CFGGEN -j /etc/sonic/config_db$DEV.json --write-to-db
fi
fi
if [[ "$BOOT_TYPE" == "fast" ]]; then
# this is the case when base OS version does not support fast-reboot with reconciliation logic (dump.rdb is absent)
# In this case, we need to set the flag to indicate fast-reboot is in progress. Set the key to expire in 3 minutes
$SONIC_DB_CLI STATE_DB SET "FAST_REBOOT|system" "1" "EX" "180"
fi
fi
if [ -e /tmp/pending_config_migration ] || [ -e /tmp/pending_config_initialization ]; then