From 1d54fadd98ad65f4ad1de07e832ef7f606cdb943 Mon Sep 17 00:00:00 2001 From: kktheballer Date: Tue, 5 Jan 2021 18:12:37 -0800 Subject: [PATCH] Retain fgnhg state db table entry during warm reboot (#1315) Add FG_ROUTE_TABLE to backup database for warm reboot support for fgnhg. --- scripts/fast-reboot | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/fast-reboot b/scripts/fast-reboot index e884dee20b..79dff784cb 100755 --- a/scripts/fast-reboot +++ b/scripts/fast-reboot @@ -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