Skip to content

Commit b8c6e2a

Browse files
authored
Use warm-boot infrastructure for fast-boot (#12026)
1 parent 9f351ae commit b8c6e2a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

files/build_templates/docker_image_ctl.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function preStartAction()
8787
{%- if docker_container_name == "database" %}
8888
WARM_DIR=/host/warmboot
8989
if [ "$DATABASE_TYPE" != "chassisdb" ]; then
90-
if [[ ("$BOOT_TYPE" == "warm" || "$BOOT_TYPE" == "fastfast") && -f $WARM_DIR/dump.rdb ]]; then
90+
if [[ ("$BOOT_TYPE" == "warm" || "$BOOT_TYPE" == "fastfast" || "$BOOT_TYPE" == "fast") && -f $WARM_DIR/dump.rdb ]]; then
9191
# Load redis content from /host/warmboot/dump.rdb
9292
docker cp $WARM_DIR/dump.rdb database$DEV:/var/lib/redis/dump.rdb
9393
else
@@ -208,7 +208,7 @@ function postStartAction()
208208
($(docker exec -i database$DEV sonic-db-cli PING | grep -c PONG) -gt 0) ]]; do
209209
sleep 1;
210210
done
211-
if [[ ("$BOOT_TYPE" == "warm" || "$BOOT_TYPE" == "fastfast") && -f $WARM_DIR/dump.rdb ]]; then
211+
if [[ ("$BOOT_TYPE" == "warm" || "$BOOT_TYPE" == "fastfast" || "$BOOT_TYPE" == "fast") && -f $WARM_DIR/dump.rdb ]]; then
212212
# retain the dump file from last boot for debugging purposes
213213
mv $WARM_DIR/dump.rdb $WARM_DIR/dump.rdb.old
214214
else

0 commit comments

Comments
 (0)