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.
This commit is contained in:
Sheng Yang 2013-02-26 12:25:30 -08:00
parent 6831937145
commit 89dee27503

View File

@ -22,6 +22,8 @@ do
while read line while read line
do do
ip=`echo $line|cut -d " " -f 2|cut -d "/" -f 1` 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/iplist_$i
done < /tmp/iflist done < /tmp/iflist
sleep 1