Merge "Fixes external network to services tenant and no dhcp"
authorTim Rozet <trozet@redhat.com>
Wed, 2 Sep 2015 19:21:08 +0000 (19:21 +0000)
committerGerrit Code Review <gerrit@172.30.200.206>
Wed, 2 Sep 2015 19:21:08 +0000 (19:21 +0000)
foreman/ci/clean.sh
foreman/ci/deploy.sh

index 1bd1713..345864b 100755 (executable)
@@ -128,7 +128,7 @@ if [ $skip_vagrant -eq 0 ]; then
         echo "${red}Unable to destroy $vm Vagrant VM! Attempting to killall vagrant if process is hung ${reset}"
         killall vagrant
         echo "${blue}Checking if vagrant was already destroyed and no process is active...${reset}"
-        if ps axf | grep vagrant; then
+        if ps axf | grep vagrant | grep -v 'grep'; then
           echo "${red}Vagrant process still exists after kill...exiting ${reset}"
           exit 1
         else
@@ -158,13 +158,13 @@ if [ $skip_vagrant -eq 0 ]; then
 
   echo "${blue}Checking for any remaining virtual box processes...${reset}"
   ###kill virtualbox
-  if ps axf | grep virtualbox; then
+  if ps axf | grep virtualbox | grep -v 'grep'; then
     echo "${blue}virtualbox processes are still running. Killing any remaining VirtualBox processes...${reset}"
     killall virtualbox
   fi
 
   ###kill any leftover VMs (brute force)
-  if ps axf | grep VBoxHeadless; then
+  if ps axf | grep VBoxHeadless | grep -v 'grep'; then
     echo "${blue}VBoxHeadless processes are still running. Killing any remaining VBoxHeadless processes...${reset}"
     killall VBoxHeadless
   fi
index 9c1447b..dcead8b 100755 (executable)
@@ -30,6 +30,7 @@ declare -A admin_ip_arr
 declare -A public_ip_arr
 
 vm_dir=/var/opt/opnfv
+script=`realpath $0`
 ##END VARS
 
 ##FUNCTIONS
@@ -479,7 +480,6 @@ clean_tmp() {
 ##params: destination directory
 ##usage: clone_bgs /tmp/myvm/
 clone_bgs() {
-  script=`realpath $0`
   script_dir="`dirname "$script"`"
   cp -fr $script_dir/ $1
   cp -fr $script_dir/../../common/puppet-opnfv $1
@@ -993,7 +993,6 @@ start_virtual_nodes() {
     compute_wait_completed=false
 
     for node in ${nodes}; do
-      cd /tmp/
 
       ##remove VM nodes incase it wasn't cleaned up
       rm -rf $vm_dir/$node
@@ -1127,6 +1126,7 @@ start_virtual_nodes() {
       if ! vagrant ssh -c "route | grep default | grep $this_default_gw"; then
         echo "${blue} Adding public route back to $node! ${reset}"
         vagrant ssh -c "route add default gw $this_default_gw"
+        vagrant ssh -c "route delete default gw 10.0.2.2"
       fi
       popd
     done