From 3f97890ec1cbedfa59bd77d11b1f1436e282659b Mon Sep 17 00:00:00 2001 From: Fatih Degirmenci Date: Mon, 12 Mar 2018 21:10:48 +0100 Subject: Do not grep log text to determine failure Pipefail should be sufficient to determine the failure so this change gets rid of grepping the logs for failure and unreachable to leave the evaluation to bash itself. Change-Id: Ie928438c1503b086159276af4308f5549b58cb71 Signed-off-by: Fatih Degirmenci --- xci/installer/osa/deploy.sh | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/xci/installer/osa/deploy.sh b/xci/installer/osa/deploy.sh index 1e442918..255d4c67 100755 --- a/xci/installer/osa/deploy.sh +++ b/xci/installer/osa/deploy.sh @@ -127,11 +127,6 @@ ssh root@$OPNFV_HOST_IP "set -o pipefail; openstack-ansible ${XCI_ANSIBLE_VERBOS releng-xci/.cache/repos/openstack-ansible/playbooks/setup-infrastructure.yml | tee setup-infrastructure.log" scp root@$OPNFV_HOST_IP:~/setup-infrastructure.log $LOG_PATH/setup-infrastructure.log echo "-----------------------------------------------------------------------" -# check the log to see if we have any error -if grep -q 'failed=1\|unreachable=1' $LOG_PATH/setup-infrastructure.log; then - echo "Error: OpenStack node setup failed!" - exit 1 -fi #------------------------------------------------------------------------------- # Verify database cluster @@ -161,11 +156,7 @@ ssh root@$OPNFV_HOST_IP "set -o pipefail; openstack-ansible ${XCI_ANSIBLE_VERBOS releng-xci/.cache/repos/openstack-ansible/playbooks/setup-openstack.yml | tee opnfv-setup-openstack.log" scp root@$OPNFV_HOST_IP:~/opnfv-setup-openstack.log $LOG_PATH/opnfv-setup-openstack.log echo "-----------------------------------------------------------------------" -# check the log to see if we have any error -if grep -q 'failed=1\|unreachable=1' $LOG_PATH/opnfv-setup-openstack.log; then - echo "Error: OpenStack installation failed!" - exit 1 -fi +echo echo "Info: OpenStack installation is successfully completed!" #------------------------------------------------------------------------------- -- cgit 1.2.3-korg