bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From evan...@apache.org
Subject [bigtop] branch master updated: BIGTOP-3207. [Provisioner] Do not exit when destroying got no cluster exists (#519)
Date Sat, 20 Apr 2019 18:32:36 GMT
This is an automated email from the ASF dual-hosted git repository.

evansye pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bigtop.git


The following commit(s) were added to refs/heads/master by this push:
     new 18ae2cd  BIGTOP-3207. [Provisioner] Do not exit when destroying got no cluster exists
(#519)
18ae2cd is described below

commit 18ae2cd9d2bd899a899f6bd1b8b6615dcbd505b9
Author: Evans Ye <evansye@apache.org>
AuthorDate: Sun Apr 21 02:32:32 2019 +0800

    BIGTOP-3207. [Provisioner] Do not exit when destroying got no cluster exists (#519)
---
 provisioner/docker/docker-hadoop.sh | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/provisioner/docker/docker-hadoop.sh b/provisioner/docker/docker-hadoop.sh
index d58ecee..0bc2e31 100755
--- a/provisioner/docker/docker-hadoop.sh
+++ b/provisioner/docker/docker-hadoop.sh
@@ -173,14 +173,14 @@ smoke-tests() {
 destroy() {
     if [ -z ${PROVISION_ID+x} ]; then
         echo "No cluster exists!"
-        exit 0
-    fi
-    docker exec ${NODES[0]} bash -c "umount /etc/hosts; rm -f /etc/hosts"
-    if [ -n "$PROVISION_ID" ]; then
-        docker-compose -p $PROVISION_ID stop
-        docker-compose -p $PROVISION_ID rm -f
+    else
+        docker exec ${NODES[0]} bash -c "umount /etc/hosts; rm -f /etc/hosts"
+        if [ -n "$PROVISION_ID" ]; then
+            docker-compose -p $PROVISION_ID stop
+            docker-compose -p $PROVISION_ID rm -f
+        fi
+        rm -rvf ./config .provision_id .error_msg*
     fi
-    rm -rvf ./config .provision_id .error_msg*
 }
 
 bigtop-puppet() {


Mime
View raw message