Do not grep log text to determine failure 01/53601/2
authorFatih Degirmenci <fdegir@gmail.com>
Mon, 12 Mar 2018 20:10:48 +0000 (21:10 +0100)
committerFatih Degirmenci <fdegir@gmail.com>
Tue, 13 Mar 2018 09:15:28 +0000 (10:15 +0100)
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 <fdegir@gmail.com>
xci/installer/osa/deploy.sh

index 1e44291..255d4c6 100755 (executable)
@@ -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!"
 
 #-------------------------------------------------------------------------------