Disable strict host key checking for galera cluster check 05/42005/3
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>
Thu, 14 Sep 2017 19:11:12 +0000 (13:11 -0600)
committerFatih Degirmenci <fatih.degirmenci@ericsson.com>
Fri, 15 Sep 2017 04:23:37 +0000 (04:23 +0000)
The command to check the galera cluster fails due to having strict
host key checking enabled.

This change disables strict host key checking for galera_container
to ensure we can verify if the database cluster is operational.

OSA does this for aio on their gate and put host key checking
configuration to group_vars which we might need to do as well.

Change-Id: Ifc59581d979c71f1db1b87126659470dc85cc2db
Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
xci/xci-deploy.sh

index ced6fff..ad4317f 100755 (executable)
@@ -206,13 +206,13 @@ fi
 #-------------------------------------------------------------------------------
 echo "Info: Verifying database cluster"
 echo "-----------------------------------------------------------------------"
-ssh root@$OPNFV_HOST_IP "ansible -vvv -i $OPENSTACK_OSA_PATH/playbooks/inventory/ \
-       galera_container -m shell \
+ssh root@$OPNFV_HOST_IP "ansible --ssh-extra-args='-o StrictHostKeyChecking=no' \
+    -i $OPENSTACK_OSA_PATH/playbooks/inventory/ galera_container -m shell \
        -a \"mysql -h localhost -e \\\"show status like '%wsrep_cluster_%';\\\"\" | tee galera.log"
 scp root@$OPNFV_HOST_IP:~/galera.log $LOG_PATH/galera.log
 echo "-----------------------------------------------------------------------"
 # check the log to see if we have any error
-if grep -q 'FAILED' $LOG_PATH/galera.log; then
+if grep -q 'FAILED\|UNREACHABLE' $LOG_PATH/galera.log; then
     echo "Error: Database cluster verification failed!"
     exit 1
 fi