mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
systemvm: vpc router fix /etc/network/interfaces is misconfigured (#6435)
This PR fixes that the /etc/network/interfaces is misconfigured in VPC VR startup, which causes VPC VR to be stuck for 1 minute and continue working. The issue is because ifup eth0 and ifdown eth0 do not work when /etc/network/interfaces is not correct in VPC VR.
This commit is contained in:
parent
b7f845ab13
commit
11d27a5a3a
@ -188,6 +188,7 @@ setup_interface_sshd() {
|
||||
setup_sshd $ETH1_IP "eth1"
|
||||
|
||||
elif [ "$TYPE" == "vpcrouter" ]; then
|
||||
init_interfaces "eth0"
|
||||
setup_interface "0" $ETH0_IP $ETH0_MASK $GW
|
||||
setup_sshd $ETH0_IP "eth0"
|
||||
|
||||
|
||||
@ -25,11 +25,6 @@ setup_vpcrouter() {
|
||||
grep -q $NAME /etc/hosts || echo "127.0.0.1 $NAME" >> /etc/hosts;
|
||||
fi
|
||||
|
||||
cat > /etc/network/interfaces << EOF
|
||||
auto lo eth0
|
||||
iface lo inet loopback
|
||||
EOF
|
||||
|
||||
echo $NAME > /etc/hostname
|
||||
echo 'AVAHI_DAEMON_DETECT_LOCAL=0' > /etc/default/avahi-daemon
|
||||
hostnamectl set-hostname $NAME
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user