From c79e906f81f7ffa0967bee3d056ac6d34e024ec0 Mon Sep 17 00:00:00 2001 From: Tamer Ahmed Date: Wed, 17 Jun 2020 17:10:56 -0700 Subject: [PATCH 1/2] [fast-reboot] Back up FDB/ARP/Default routes FDB/ARP/Devault routes files are deleted after swssconfig. This make debugging/validation of device conversion hard. This PR save those files in order to facilitate device conversion. signed-off-by: Tamer Ahmed --- dockers/docker-orchagent/swssconfig.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dockers/docker-orchagent/swssconfig.sh b/dockers/docker-orchagent/swssconfig.sh index 856b3bcd0e41..6960b3908cbe 100755 --- a/dockers/docker-orchagent/swssconfig.sh +++ b/dockers/docker-orchagent/swssconfig.sh @@ -8,19 +8,19 @@ function fast_reboot { if [[ -f /fdb.json ]]; then swssconfig /fdb.json - rm -f /fdb.json + mv /fdb.json /fdb.json.1 fi if [[ -f /arp.json ]]; then swssconfig /arp.json - rm -f /arp.json + mv /arp.json /arp.json.1 fi if [[ -f /default_routes.json ]]; then swssconfig /default_routes.json - rm -f /default_routes.json + mv /default_routes.json /default_routes.json.1 fi ;; From 2c88833c662a760cee6913f5a7b83bef3c40348e Mon Sep 17 00:00:00 2001 From: Tamer Ahmed Date: Fri, 19 Jun 2020 09:48:19 -0700 Subject: [PATCH 2/2] review comment --- dockers/docker-orchagent/swssconfig.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dockers/docker-orchagent/swssconfig.sh b/dockers/docker-orchagent/swssconfig.sh index 6960b3908cbe..0743d95f8eb6 100755 --- a/dockers/docker-orchagent/swssconfig.sh +++ b/dockers/docker-orchagent/swssconfig.sh @@ -8,19 +8,19 @@ function fast_reboot { if [[ -f /fdb.json ]]; then swssconfig /fdb.json - mv /fdb.json /fdb.json.1 + mv -f /fdb.json /fdb.json.1 fi if [[ -f /arp.json ]]; then swssconfig /arp.json - mv /arp.json /arp.json.1 + mv -f /arp.json /arp.json.1 fi if [[ -f /default_routes.json ]]; then swssconfig /default_routes.json - mv /default_routes.json /default_routes.json.1 + mv -f /default_routes.json /default_routes.json.1 fi ;;