- log "Wait $SERVERFACET recovery complete before doing next failover ...."
- if [[ $(server_numfailovers $SERVERFACET) != 0 ]]; then
- if ! wait_recovery_complete $SERVERFACET ; then
- echo "$SERVERFACET recovery is not completed!"
- exit 7
+ # Increment the number of failovers.
+ val=$((${!var} + 1))
+ eval $var=$val
+
+ current_ts=$(date +%s)
+ ELAPSED=$((current_ts - start_ts))
+
+ sleep=$((SERVER_FAILOVER_PERIOD - (current_ts - it_time_start)))
+
+ # Keep counting the number of iterations when
+ # time spent to failover and two client loads check exceeded
+ # the value ( SERVER_FAILOVER_PERIOD - MINSLEEP ).
+ if [ $sleep -lt $MINSLEEP ]; then
+ reqfail=$((reqfail + 1))
+ log "WARNING: failover and two check_client_loads time exceeded \
+SERVER_FAILOVER_PERIOD - MINSLEEP!
+Failed to load the filesystem with I/O for a minimum period of \
+$MINSLEEP $reqfail times ( REQFAIL=$REQFAIL ).
+This iteration, the load was only applied for sleep=$sleep seconds.
+Estimated max recovery time: $MAX_RECOV_TIME
+Probably the hardware is taking excessively long time to boot.
+Try to increase SERVER_FAILOVER_PERIOD (current is $SERVER_FAILOVER_PERIOD), \
+bug 20918"
+ [ $reqfail -gt $REQFAIL ] && exit 6