From 5369607d5a04eb2afbcbcc78e26abf4d7b005e35 Mon Sep 17 00:00:00 2001 From: weixchen1215 <44277328+weixchen1215@users.noreply.github.com> Date: Tue, 22 Dec 2020 15:48:16 -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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/fast-reboot b/scripts/fast-reboot index 25b69a5c8b..e9519612de 100755 --- a/scripts/fast-reboot +++ b/scripts/fast-reboot @@ -248,11 +248,12 @@ 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|* sonic-db-cli STATE_DB 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|') \ and not string.match(k, 'VXLAN_TUNNEL_TABLE|') \ and not string.match(k, 'BUFFER_MAX_PARAM_TABLE|') then