mirror of https://github.com/apache/cloudstack.git
CS-15094: Fix multiply vlan of redundang router
This fix would work because: 1. When booting up the router, there is possible that no ip information have been set for the interface(CS would do it after confirm router is up), so the interface isn't associate with any ip, then ifconfig cannot work. We have to use ifup, this is especially true for the first router become master. 2. After booting up phase, the ip would be associated with interfaces, then we can use ifconfig to bring them up.
This commit is contained in:
parent
705481b562
commit
4f4b1f56ee
|
|
@ -21,8 +21,14 @@ set -e
|
|||
ip link|grep BROADCAST|grep -v eth0|grep -v eth1|cut -d ":" -f 2 > /tmp/iflist
|
||||
while read i
|
||||
do
|
||||
ifdown $i
|
||||
ifup $i
|
||||
if [ "$i" == "eth2" ]
|
||||
then
|
||||
ifdown $i
|
||||
ifup $i
|
||||
else
|
||||
ifconfig $i down
|
||||
ifconfig $i up
|
||||
fi
|
||||
done < /tmp/iflist
|
||||
ip route add default via [GATEWAY] dev eth2 && \
|
||||
service cloud-passwd-srvr restart && \
|
||||
|
|
|
|||
Loading…
Reference in New Issue