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 2017/12/16 06:46:27 UTC

[cloudstack] 34/34: vmware related fixes

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

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

commit ac9b898236149c9360c74ccca144e2ce595eaea5
Author: Rohit Yadav <ro...@shapeblue.com>
AuthorDate: Fri Dec 15 17:15:36 2017 +0530

    vmware related fixes
    
    Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
---
 systemvm/debian/opt/cloud/bin/setup/common.sh    | 8 ++++----
 systemvm/debian/opt/cloud/bin/setup/vpcrouter.sh | 7 ++-----
 2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/systemvm/debian/opt/cloud/bin/setup/common.sh b/systemvm/debian/opt/cloud/bin/setup/common.sh
index 078cb58..23bf5ad 100755
--- a/systemvm/debian/opt/cloud/bin/setup/common.sh
+++ b/systemvm/debian/opt/cloud/bin/setup/common.sh
@@ -331,14 +331,14 @@ setup_common() {
     ip route add default via $GW dev $gwdev
   fi
 
-  # a hacking way to activate vSwitch under VMware
-  ping -n -c 3 $GW &
+  # Workaround to activate vSwitch under VMware
+  timeout 5 ping -n -c 3 $GW || true
   if [ -n "$MGMTNET"  -a -n "$LOCAL_GW" ]
   then
-      ping -n -c 3 $LOCAL_GW &
+      timeout 5 ping -n -c 3 $LOCAL_GW || true
       #This code is added to address ARP issue by pinging MGMT_GW
       MGMT_GW=$(echo $MGMTNET | awk -F "." '{print $1"."$2"."$3".1"}')
-      ping -n -c 3 $MGMT_GW &
+      timeout 5 ping -n -c 3 $MGMT_GW || true
   fi
 
   if [ "$HYPERVISOR" == "vmware" ]; then
diff --git a/systemvm/debian/opt/cloud/bin/setup/vpcrouter.sh b/systemvm/debian/opt/cloud/bin/setup/vpcrouter.sh
index 106cfd6..6bad7e7 100755
--- a/systemvm/debian/opt/cloud/bin/setup/vpcrouter.sh
+++ b/systemvm/debian/opt/cloud/bin/setup/vpcrouter.sh
@@ -65,11 +65,8 @@ EOF
      if [ "$HYPERVISOR" == "vmware" ] || [ "$HYPERVISOR" == "hyperv" ];
      then
          ip route add $MGMTNET via $LOCAL_GW dev eth0
-
-          # a hacking way to activate vSwitch under VMware
-         ping -n -c 3 $LOCAL_GW &
-         sleep 3
-         pkill ping
+         # workaround to activate vSwitch under VMware
+         timeout 5 ping -n -c 3 $LOCAL_GW || true
      fi
   fi
 

-- 
To stop receiving notification emails like this one, please contact
"commits@cloudstack.apache.org" <co...@cloudstack.apache.org>.