From 4601adeba6efa57d23cee262f791e9317371acb1 Mon Sep 17 00:00:00 2001 From: Dong Zhang <41927498+dzhangalibaba@users.noreply.github.com> Date: Wed, 13 May 2020 09:34:57 -0700 Subject: [PATCH] [MultiDB] use sonic-db-cli instead of redis-cli in new added codes (#907) --- scripts/fast-reboot | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/fast-reboot b/scripts/fast-reboot index ec0ccae1b784..0478b3af1ed5 100755 --- a/scripts/fast-reboot +++ b/scripts/fast-reboot @@ -107,7 +107,7 @@ function clear_fast_boot() { common_clear - redis-cli -n 6 DEL "FAST_REBOOT|system" &>/dev/null || /bin/true + sonic-db-cli STATE_DB DEL "FAST_REBOOT|system" &>/dev/null || /bin/true } function clear_warm_boot() @@ -208,7 +208,8 @@ function backup_database() end end " 0 > /dev/null - redis-cli save > /dev/null + sonic-db-cli SAVE > /dev/null + #TODO : need a script to copy all rdb files if there is multiple db instances config docker cp database:/var/lib/redis/$REDIS_FILE $WARM_DIR docker exec -i database rm /var/lib/redis/$REDIS_FILE } @@ -317,7 +318,7 @@ case "$REBOOT_TYPE" in "fast-reboot") BOOT_TYPE_ARG=$REBOOT_TYPE trap clear_fast_boot EXIT HUP INT QUIT TERM KILL ABRT ALRM - redis-cli -n 6 SET "FAST_REBOOT|system" "1" "EX" "180" &>/dev/null + sonic-db-cli STATE_DB SET "FAST_REBOOT|system" "1" "EX" "180" &>/dev/null ;; "warm-reboot") if [[ "$sonic_asic_type" == "mellanox" ]]; then