Skip to content

Commit

Permalink
[MultiDB] use sonic-db-cli instead of redis-cli in new added codes (s…
Browse files Browse the repository at this point in the history
  • Loading branch information
dzhangalibaba authored May 13, 2020
1 parent 8bfa3b7 commit 4601ade
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/fast-reboot
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4601ade

Please sign in to comment.