mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 11:52:28 +01:00
bug 12727: Add arping to update the vSwitch cache
We need to broadcast all our public IP address's ARP, not only the gateway one. status 12727: resolved fixed
This commit is contained in:
parent
0a8606f47c
commit
14d6c85176
@ -418,6 +418,7 @@ setup_redundant_router() {
|
||||
cp /root/redundant_router/primary-backup.sh.templ $rrouter_bin_path/primary-backup.sh
|
||||
cp /root/redundant_router/heartbeat.sh.templ $rrouter_bin_path/heartbeat.sh
|
||||
cp /root/redundant_router/check_heartbeat.sh.templ $rrouter_bin_path/check_heartbeat.sh
|
||||
cp /root/redundant_router/arping_gateways.sh.templ $rrouter_bin_path/arping_gateways.sh
|
||||
cp /root/redundant_router/check_bumpup.sh $rrouter_bin_path/
|
||||
cp /root/redundant_router/disable_pubip.sh $rrouter_bin_path/
|
||||
cp /root/redundant_router/checkrouter.sh.templ /root/checkrouter.sh
|
||||
@ -446,6 +447,7 @@ setup_redundant_router() {
|
||||
sed -i "s/\[RROUTER_LOG\]/$rrouter_log_str/g" $rrouter_bin_path/fault.sh
|
||||
sed -i "s/\[RROUTER_LOG\]/$rrouter_log_str/g" $rrouter_bin_path/primary-backup.sh
|
||||
sed -i "s/\[RROUTER_LOG\]/$rrouter_log_str/g" $rrouter_bin_path/check_heartbeat.sh
|
||||
sed -i "s/\[RROUTER_LOG\]/$rrouter_log_str/g" $rrouter_bin_path/arping_gateways.sh
|
||||
sed -i "s/\[RROUTER_LOG\]/$rrouter_log_str/g" /root/checkrouter.sh
|
||||
chmod a+x $rrouter_bin_path/*.sh
|
||||
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
ip link|grep BROADCAST|grep -v eth0|grep -v eth1|cut -d ":" -f 2 > /tmp/iflist
|
||||
while read i
|
||||
do
|
||||
ip addr show $i|grep "inet " > /tmp/iplist_$i
|
||||
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
|
||||
done < /tmp/iplist_$i
|
||||
done < /tmp/iflist
|
||||
@ -31,9 +31,7 @@ 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
|
||||
[RROUTER_BIN_PATH]/arping_gateways.sh
|
||||
echo Status: MASTER >> [RROUTER_LOG]
|
||||
|
||||
releaseLockFile $lock $locked
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user