From 89dee2750330d4e19a3f2142ce0b33b00e22c053 Mon Sep 17 00:00:00 2001 From: Sheng Yang Date: Tue, 26 Feb 2013 12:25:30 -0800 Subject: [PATCH] CLOUDSTACK-1414: Reduce arping time to nearly 0 In the previous version it would take at least 1 seconds for arping, and it would be big if the VR has more than 30 IPs - our biglock default timeout is 30 seconds. Fix it by send out two arping immediately, and then sleep 1 second for router to update arp cache. --- .../config/root/redundant_router/arping_gateways.sh.templ | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/patches/systemvm/debian/config/root/redundant_router/arping_gateways.sh.templ b/patches/systemvm/debian/config/root/redundant_router/arping_gateways.sh.templ index 176bce22559..931c95901c8 100644 --- a/patches/systemvm/debian/config/root/redundant_router/arping_gateways.sh.templ +++ b/patches/systemvm/debian/config/root/redundant_router/arping_gateways.sh.templ @@ -22,6 +22,8 @@ do while read line do ip=`echo $line|cut -d " " -f 2|cut -d "/" -f 1` - arping -I $i -A $ip -c 2 >> [RROUTER_LOG] 2>&1 + arping -I $i -A $ip -c 1 >> [RROUTER_LOG] 2>&1 + arping -I $i -A $ip -c 1 >> [RROUTER_LOG] 2>&1 done < /tmp/iplist_$i done < /tmp/iflist +sleep 1