Skip to content

Commit

Permalink
Retain fgnhg state db table entry during warm reboot (sonic-net#1315)
Browse files Browse the repository at this point in the history
Add FG_ROUTE_TABLE to backup database for warm reboot support for fgnhg.
  • Loading branch information
kktheballer committed Jan 6, 2021
1 parent 0cd0822 commit 1d54fad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/fast-reboot
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,13 @@ function backup_database()
debug "Backing up database ..."
# Dump redis content to a file 'dump.rdb' in warmboot directory
mkdir -p $WARM_DIR
# Delete keys in stateDB except FDB_TABLE|*, MIRROR_SESSION_TABLE|*, WARM_RESTART_ENABLE_TABLE|*
# Delete keys in stateDB except FDB_TABLE|*, MIRROR_SESSION_TABLE|*, WARM_RESTART_ENABLE_TABLE|*, FG_ROUTE_TABLE|*
redis-cli -n 6 eval "
for _, k in ipairs(redis.call('keys', '*')) do
if not string.match(k, 'FDB_TABLE|') and not string.match(k, 'WARM_RESTART_TABLE|') \
and not string.match(k, 'MIRROR_SESSION_TABLE|') \
and not string.match(k, 'FG_ROUTE_TABLE|') \
and not string.match(k, 'WARM_RESTART_ENABLE_TABLE|') then
redis.call('del', k)
end
Expand Down

0 comments on commit 1d54fad

Please sign in to comment.