bigtop-commits mailing list archives

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

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


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

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

    BIGTOP-3207. [Provisioner] Do not exit when destroying got no cluster exists (#520)
---
 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