bug 11233: Update switch's cache using ping

We would ping the gateway after transit to MASTER, this should speed up the
update of switch's cache.
This commit is contained in:
Sheng Yang 2011-09-14 15:54:39 -07:00
parent c85902b04c
commit fe838c5528
2 changed files with 4 additions and 0 deletions

View File

@ -367,6 +367,7 @@ setup_redundant_router() {
sed -i "s/\[ETH2IP\]/$ETH2_IP/g" $rrouter_bin_path/enable_pubip.sh
sed -i "s/\[ETH2MASK\]/$ETH2_MASK/g" $rrouter_bin_path/enable_pubip.sh
sed -i "s/\[GATEWAY\]/$GW/g" $rrouter_bin_path/enable_pubip.sh
sed -i "s/\[GATEWAY\]/$GW/g" $rrouter_bin_path/master.sh
sed -i "s/\[RROUTER_BIN_PATH\]/$rrouter_bin_path_str/g" $rrouter_bin_path/master.sh
sed -i "s/\[RROUTER_BIN_PATH\]/$rrouter_bin_path_str/g" $rrouter_bin_path/backup.sh
sed -i "s/\[RROUTER_BIN_PATH\]/$rrouter_bin_path_str/g" $rrouter_bin_path/fault.sh

View File

@ -31,6 +31,9 @@ if [ $ret -ne 0 ]
then
echo Fail to switch conntrackd mode, but try to continue working >> [RROUTER_LOG]
fi
ping -n -c 3 [GATEWAY] >> [RROUTER_LOG] 2>&1 &
sleep 3
pkill ping
echo Status: MASTER >> [RROUTER_LOG]
releaseLockFile $lock $locked