Skip to content

Commit

Permalink
[docker_image_ctl] flush ASIC_DB on fast boot
Browse files Browse the repository at this point in the history
Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
  • Loading branch information
stepanblyschak committed May 24, 2024
1 parent 64646f4 commit 09f038f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions files/build_templates/docker_image_ctl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ function postStartAction()
fi

if [[ "$BOOT_TYPE" == "fast" ]]; then
# Flush ASIC DB. On fast-boot there should be nothing in there.
# In the older versions there has been an issue where a queued FDB event might get into ASIC_DB causing syncd crash at boot.
$SONIC_DB_CLI ASIC_DB FLUSHDB
# 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"
Expand Down

0 comments on commit 09f038f

Please sign in to comment.