summaryrefslogtreecommitdiffstats
path: root/foreman
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2015-09-01 16:41:28 -0400
committerTim Rozet <trozet@redhat.com>2015-09-01 16:41:28 -0400
commit18ea7aaaaf32eb7027008196f2c784cd156fb5d9 (patch)
tree05cd763c35a078a27e3127a399556add376348fd /foreman
parent52639193804c6da3765066ce0f2aa365d381f897 (diff)
Fixes issue with deploy copying from /tmp and clean bailing early
deploy.sh was failing in user deployments because the necessary puppet modules and vagrant files were being copied accidentally from /tmp and not the script directory. This patch fixes that issue. clean.sh was failing checks to see if vagrant or virtualbox was still running, due to a bug with checking "ps" and using grep. This patch resolves that. JIRA: APEX-16,APEX-17 Change-Id: I1faa6fc134c0308acb2e7b14be30f7cd3c99d109 Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'foreman')
-rwxr-xr-xforeman/ci/clean.sh6
-rwxr-xr-xforeman/ci/deploy.sh3
2 files changed, 4 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..50a9dcf 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