diff options
-rwxr-xr-x | foreman/ci/clean.sh | 6 | ||||
-rwxr-xr-x | foreman/ci/deploy.sh | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/foreman/ci/clean.sh b/foreman/ci/clean.sh index 1bd1713..345864b 100755 --- a/foreman/ci/clean.sh +++ b/foreman/ci/clean.sh @@ -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 diff --git a/foreman/ci/deploy.sh b/foreman/ci/deploy.sh index 9c1447b..dcead8b 100755 --- a/foreman/ci/deploy.sh +++ b/foreman/ci/deploy.sh @@ -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 |