- log "==== Checking the clients loads AFTER failed client reintegrated -- failure NOT OK"
- if ! ERRORS_OK= check_client_loads $(exclude_items_from_list $NODES_TO_USE $FAIL_CLIENT); then
- log "Client load failed. Exiting"
- exit 5
- 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
+
+ restart_client_loads $fail_client $ERRORS_OK || exit $?
+
+ # Check that not failed clients loads are still running.
+ # No application failures should occur on clients that were not failed.
+ log "==== Checking the clients loads AFTER failed client reintegrated \
+-- failure NOT OK"
+ if ! ERRORS_OK= check_client_loads \
+ $(exclude_items_from_list $NODES_TO_USE $fail_client); then
+ log "Client load failed. Exiting..."
+ exit 5
+ fi