- facet_failover "$SERVERFACET" || exit 1
- if ! wait_recovery_complete $SERVERFACET $((TIMEOUT * 10)); then
- echo "$SERVERFACET recovery is not completed!"
- exit 7
- fi
-
- boot_node $FAIL_CLIENT
- echo "Reintegrating $FAIL_CLIENT"
- zconf_mount $FAIL_CLIENT $MOUNT || exit $?
-
- # Increment the number of failovers
- val=$((${!var} + 1))
- eval $var=$val
- val=$((${!client_var} + 1))
- eval $client_var=$val
-
- # load script on failed clients could create END_RUN_FILE
- # We shuold remove it and ignore the failure if this
- # file contains the failed client only.
- # We can not use ERRORS_OK when start all loads at the start of this script
- # because the application errors allowed for random failed client only, but
- # not for all clients.
- if [ -e $END_RUN_FILE ]; then
- read END_RUN_NODE < $END_RUN_FILE
- [[ $END_RUN_NODE = $FAIL_CLIENT ]] &&
- rm -f $END_RUN_FILE || exit 13
- fi
-
- restart_client_loads $FAIL_CLIENT $ERRORS_OK || exit $?
+ log "Starting failover on $serverfacet"
+ facet_failover "$serverfacet" || exit 1
+
+ if ! wait_recovery_complete $serverfacet; then
+ echo "$serverfacet recovery is not completed!"
+ exit 7
+ fi
+
+ boot_node $fail_client
+ echo "Reintegrating $fail_client"
+ zconf_mount $fail_client $MOUNT || exit $?
+ client_up $fail_client || exit $?
+
+ # Increment the number of failovers
+ val=$((${!var} + 1))
+ eval $var=$val
+ val=$((${!client_var} + 1))
+ eval $client_var=$val
+
+ # load script on failed clients could create END_RUN_FILE
+ # We shuold remove it and ignore the failure if this
+ # file contains the failed client only.
+ # We can not use ERRORS_OK when start all loads at the start of
+ # this script because the application errors allowed for random
+ # failed client only, but not for all clients.
+ if [ -e $END_RUN_FILE ]; then
+ local end_run_node
+ read end_run_node < $END_RUN_FILE
+ [[ $end_run_node = $fail_client ]] &&
+ rm -f $END_RUN_FILE || exit 13
+ fi