diff options
author | Amitay Isaacs <amitay@gmail.com> | 2016-10-17 18:36:33 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@gmail.com> | 2016-10-18 12:15:57 +1100 |
commit | dabaa298002ae89aeb5993ba5ac05976dfce750c (patch) | |
tree | 3a962a02ce6310e52653113ff99d08dd987b0c19 | |
parent | 6b4977d8a4d09a002261379ebd04bf5718dac104 (diff) | |
download | autocluster-dabaa298002ae89aeb5993ba5ac05976dfce750c.tar.gz autocluster-dabaa298002ae89aeb5993ba5ac05976dfce750c.tar.xz autocluster-dabaa298002ae89aeb5993ba5ac05976dfce750c.zip |
Fail if any of the cluster setup tasks fail
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
-rwxr-xr-x | autocluster | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/autocluster b/autocluster index b987a12..d086009 100755 --- a/autocluster +++ b/autocluster @@ -149,7 +149,7 @@ for_each_node () { local n for n in $NODES ; do - "$@" $(IFS=: ; echo $n) + "$@" $(IFS=: ; echo $n) || return 1 done } @@ -729,7 +729,8 @@ cluster_setup () local stages="install_packages setup_clusterfs setup_node setup_cluster" local stage for stage in $stages ; do - for_each_node _cluster_setup_do_stage "$stage" + for_each_node _cluster_setup_do_stage "$stage" || \ + die "task $stage failed" done } |