From f03720f0a3fb234ffa895014a2c0ea978f7f2da4 Mon Sep 17 00:00:00 2001 From: Souhaila Noor Date: Tue, 23 Nov 2021 16:33:32 -0600 Subject: [PATCH] error handling --- qa/scripts/deployNode.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/qa/scripts/deployNode.sh b/qa/scripts/deployNode.sh index 3f3d4823b..3511c78b7 100755 --- a/qa/scripts/deployNode.sh +++ b/qa/scripts/deployNode.sh @@ -48,16 +48,16 @@ REGION="us-east-2" # get AMI, security group and subnet for EC2 instance, # launch instance, save instance Id and run cloud-init to set up node env deploy_node -# if [ $? > 0 ]; then -# exit 1 -# fi +if [ $? > 0 ]; then + exit 1 +fi # Get IP for instance, scp featurebase binary, config and service files; # set up featurebase config in node initialize_featurebase -# if [ $? > 0 ]; then -# terminate_node -# exit 1 -# else -terminate_node -# fi \ No newline at end of file +if [ $? > 0 ]; then + terminate_node + exit 1 +else + terminate_node +fi \ No newline at end of file