Skip to content

Commit

Permalink
[docker-swss]: Restore FDB and ARP entries after fast reboot (#621)
Browse files Browse the repository at this point in the history
* Restore FDB and ARP entries right after fast reboot to minimize traffic corruption

* Fix typo
  • Loading branch information
pavel-shirshov authored May 24, 2017
1 parent a2eda30 commit 519802e
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions dockers/docker-orchagent/swssconfig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,30 @@ function config_acl {
fi
}

function fast_reboot {
case "$(cat /proc/cmdline)" in
*fast-reboot*)
if [[ -f /fdb.json ]];
then
swssconfig /fdb.json
rm -f /fdb.json
fi

if [[ -f /arp.json ]];
then
swssconfig /arp.json
rm -f /arp.json
fi
;;
*)
;;
esac
}


# Restore FDB and ARP table ASAP
fast_reboot

HWSKU=`sonic-cfggen -m /etc/sonic/minigraph.xml -v minigraph_hwsku`

SWSSCONFIG_ARGS="00-copp.config.json ipinip.json mirror.json "
Expand Down

0 comments on commit 519802e

Please sign in to comment.