You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2022/12/09 12:40:28 UTC

[cloudstack] branch 4.17 updated: systemvm: vpc router fix /etc/network/interfaces is misconfigured (#6435)

This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch 4.17
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.17 by this push:
     new 11d27a5a3af systemvm: vpc router fix /etc/network/interfaces is misconfigured (#6435)
11d27a5a3af is described below

commit 11d27a5a3af75c7e05a56abfaf12c6349402e783
Author: Wei Zhou <we...@apache.org>
AuthorDate: Fri Dec 9 13:40:20 2022 +0100

    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