6 TESTSUITELOG=${TESTSUITELOG:-$TMP/recovery-mds-scale}
7 LOG=${TESTSUITELOG}_$(basename $0)-$(hostname)
15 . $(dirname $0)/functions.sh
17 assert_env MOUNT END_RUN_FILE LOAD_PID_FILE
21 # recovery-*-scale scripts use this to signal the client loads to die
22 echo $$ >$LOAD_PID_FILE
24 TESTDIR=$MOUNT/d0.tar-$(hostname)
27 tar cf - /etc | tar xf - 2>&1 | tee $LOG
28 return ${PIPESTATUS[1]}
32 while [ ! -e "$END_RUN_FILE" ] && $CONTINUE; do
33 echoerr "$(date +'%F %H:%M:%S'): tar run starting"
39 PREV_ERRORS=$(grep "exit delayed from previous errors" $LOG) || true
40 if [ $RC -ne 0 -a "$ERRORS_OK" -a "$PREV_ERRORS" ]; then
41 echoerr "$(date +'%F %H:%M:%S'): tar errors earlier, ignoring"
44 if [ $RC -eq 0 ]; then
45 echoerr "$(date +'%F %H:%M:%S'): tar succeeded"
48 echoerr "$(date +'%F %H:%M:%S'): tar run finished"
50 echoerr "$(date +'%F %H:%M:%S'): tar failed"
51 if [ -z "$ERRORS_OK" ]; then
52 echo $(hostname) >> $END_RUN_FILE
54 if [ $BREAK_ON_ERROR ]; then
61 echoerr "$(date +'%F %H:%M:%S'): tar run exiting"