From 11d27a5a3af75c7e05a56abfaf12c6349402e783 Mon Sep 17 00:00:00 2001 From: Wei Zhou Date: Fri, 9 Dec 2022 13:40:20 +0100 Subject: [PATCH] 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. --- systemvm/debian/opt/cloud/bin/setup/init.sh | 1 + systemvm/debian/opt/cloud/bin/setup/vpcrouter.sh | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/systemvm/debian/opt/cloud/bin/setup/init.sh b/systemvm/debian/opt/cloud/bin/setup/init.sh index 8b78e5807da..4795acf9cc3 100644 --- a/systemvm/debian/opt/cloud/bin/setup/init.sh +++ b/systemvm/debian/opt/cloud/bin/setup/init.sh @@ -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" diff --git a/systemvm/debian/opt/cloud/bin/setup/vpcrouter.sh b/systemvm/debian/opt/cloud/bin/setup/vpcrouter.sh index bfb06218825..7b224d9c73f 100755 --- a/systemvm/debian/opt/cloud/bin/setup/vpcrouter.sh +++ b/systemvm/debian/opt/cloud/bin/setup/vpcrouter.sh @@ -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