[docker-swss]: Restore FDB and ARP entries after fast reboot (#621)

* Restore FDB and ARP entries right after fast reboot to minimize traffic corruption

* Fix typo
This commit is contained in:
pavel-shirshov 2017-05-24 11:57:33 -07:00 committed by GitHub
parent a2eda30a03
commit 519802ec09

View File

@ -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 "