From fe838c5528b009a03431c7a2731e9a68a66476a8 Mon Sep 17 00:00:00 2001 From: Sheng Yang Date: Wed, 14 Sep 2011 15:54:39 -0700 Subject: [PATCH] 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. --- patches/systemvm/debian/config/etc/init.d/cloud-early-config | 1 + .../debian/config/root/redundant_router/master.sh.templ | 3 +++ 2 files changed, 4 insertions(+) diff --git a/patches/systemvm/debian/config/etc/init.d/cloud-early-config b/patches/systemvm/debian/config/etc/init.d/cloud-early-config index 00e6fe1bb3f..f2a88adb04c 100755 --- a/patches/systemvm/debian/config/etc/init.d/cloud-early-config +++ b/patches/systemvm/debian/config/etc/init.d/cloud-early-config @@ -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 diff --git a/patches/systemvm/debian/config/root/redundant_router/master.sh.templ b/patches/systemvm/debian/config/root/redundant_router/master.sh.templ index c5515ea4f5c..fc8fc303c4a 100644 --- a/patches/systemvm/debian/config/root/redundant_router/master.sh.templ +++ b/patches/systemvm/debian/config/root/redundant_router/master.sh.templ @@ -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