Whamcloud - gitweb
LU-3285 tests: disable DOM files in racer by default
[fs/lustre-release.git] / lustre / tests / racer / lss_destroy.sh
1 #!/bin/bash
2 trap 'kill $(jobs -p)' EXIT
3
4 LUSTRE=${LUSTRE:-$(cd $(dirname $0)/../..; echo $PWD)}
5 . $LUSTRE/tests/test-framework.sh
6 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
7
8 while /bin/true; do
9         sleep $((RANDOM % 9 + 11))
10         ssname=$(do_facet mgs "$LCTL snapshot_list -F $FSNAME 2>/dev/null" |
11                  awk '/snapshot_name.*lss_/ { print $2; exit; }')
12         [ ! -z "$ssname" ] && lsnapshot_destroy -n $ssname -f || true
13 done