mirror of https://github.com/apache/cloudstack.git
Fix "RTNETLINK answers: No such process" when starting redundant router
The issue happened quite rare, but indeed can show. And when the issue happen, the status of redundant router would be "Status: FAULT". It's due to ipassoc.sh wasn't executed before the system bring eth2 up and go to master mode, then eth2 wasn't configured correctly. Then "ip route add default xx" can't complete. This commit should fixes the issue.
This commit is contained in:
parent
5bc28e8a7e
commit
5a1978382b
|
|
@ -162,7 +162,10 @@ setup_interface() {
|
|||
fi
|
||||
|
||||
ifdown $intf
|
||||
ifup $intf
|
||||
if [ "$RROUTER" != "1" -o "$1" != "2" ]
|
||||
then
|
||||
ifup $intf
|
||||
fi
|
||||
}
|
||||
|
||||
enable_fwding() {
|
||||
|
|
@ -197,7 +200,7 @@ setup_common() {
|
|||
init_interfaces $1 $2 $3
|
||||
setup_interface "0" $ETH0_IP $ETH0_MASK $GW
|
||||
setup_interface "1" $ETH1_IP $ETH1_MASK $GW
|
||||
if [ -n "$ETH2_IP" -a "$RROUTER" != "1" ]
|
||||
if [ -n "$ETH2_IP" ]
|
||||
then
|
||||
setup_interface "2" $ETH2_IP $ETH2_MASK $GW
|
||||
fi
|
||||
|
|
@ -325,12 +328,10 @@ setup_router() {
|
|||
log_it "Setting up virtual router system vm"
|
||||
if [ -n "$ETH2_IP" ]
|
||||
then
|
||||
setup_common eth0 eth1 eth2
|
||||
if [ "$RROUTER" == "1" ]
|
||||
then
|
||||
setup_common eth0 eth1
|
||||
setup_redundant_router
|
||||
else
|
||||
setup_common eth0 eth1 eth2
|
||||
fi
|
||||
else
|
||||
setup_common eth0 eth1
|
||||
|
|
|
|||
|
|
@ -3,7 +3,5 @@
|
|||
ifconfig eth2 down && \
|
||||
ifconfig eth2 hw ether [ETH2MAC] && \
|
||||
ifconfig eth2 up && \
|
||||
sleep 3 && \
|
||||
ip route add 0/0 via [GATEWAY] && \
|
||||
sleep 3 && \
|
||||
service dnsmasq restart
|
||||
|
|
|
|||
Loading…
Reference in New Issue