Skip to content

Commit

Permalink
add express-boot support (sonic-net#17369)
Browse files Browse the repository at this point in the history
Add express-boot support
  • Loading branch information
jhli-cisco authored and VladimirKuk committed Jan 21, 2025
1 parent f6c926f commit fb99627
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
7 changes: 5 additions & 2 deletions files/build_templates/docker_image_ctl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ function getBootType()
*SONIC_BOOT_TYPE=fastfast*)
TYPE='fastfast'
;;
*SONIC_BOOT_TYPE=express*)
TYPE='express'
;;
*SONIC_BOOT_TYPE=fast*|*fast-reboot*)
TYPE='fast'
;;
Expand All @@ -87,7 +90,7 @@ function preStartAction()
{%- if docker_container_name == "database" %}
WARM_DIR=/host/warmboot
if [ "$DATABASE_TYPE" != "chassisdb" ]; then
if [[ ("$BOOT_TYPE" == "warm" || "$BOOT_TYPE" == "fastfast" || "$BOOT_TYPE" == "fast") && -f $WARM_DIR/dump.rdb ]]; then
if [[ ("$BOOT_TYPE" == "warm" || "$BOOT_TYPE" == "fastfast" || "$BOOT_TYPE" == "express" || "$BOOT_TYPE" == "fast") && -f $WARM_DIR/dump.rdb ]]; then
# Load redis content from /host/warmboot/dump.rdb
docker cp $WARM_DIR/dump.rdb database$DEV:/var/lib/redis/dump.rdb
else
Expand Down Expand Up @@ -235,7 +238,7 @@ function postStartAction()
sleep 1;
done

if [[ ("$BOOT_TYPE" == "warm" || "$BOOT_TYPE" == "fastfast" || "$BOOT_TYPE" == "fast") && -f $WARM_DIR/dump.rdb ]]; then
if [[ ("$BOOT_TYPE" == "warm" || "$BOOT_TYPE" == "fastfast" || "$BOOT_TYPE" == "express" || "$BOOT_TYPE" == "fast") && -f $WARM_DIR/dump.rdb ]]; then
# retain the dump file from last boot for debugging purposes
mv $WARM_DIR/dump.rdb $WARM_DIR/dump.rdb.old
else
Expand Down
3 changes: 3 additions & 0 deletions files/image_config/watchdog-control/watchdog-control.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ function getBootType()
*SONIC_BOOT_TYPE=fastfast*)
TYPE='fastfast'
;;
*SONIC_BOOT_TYPE=express*)
TYPE='express'
;;
*SONIC_BOOT_TYPE=fast*|*fast-reboot*)
TYPE='fast'
;;
Expand Down
3 changes: 3 additions & 0 deletions files/scripts/syncd_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ function getBootType()
*SONIC_BOOT_TYPE=fastfast*)
TYPE='fastfast'
;;
*SONIC_BOOT_TYPE=express*)
TYPE='express'
;;
*SONIC_BOOT_TYPE=fast*|*fast-reboot*)
# check that the key exists
SYSTEM_FAST_REBOOT=`sonic-db-cli STATE_DB hget "FAST_RESTART_ENABLE_TABLE|system" enable`
Expand Down

0 comments on commit fb99627

Please sign in to comment.