In the routine check_stripe_count, the different error
messages need to be modified so when an error occurs,
a user can tell what error was hit. Also, print precreated
object information at the beginning of the test and on
error.
Test-Parameters: trivial mdscount=2 mdtcount=4 testlist=conf-sanity envdefinitions=ONLY=82a
Test-Parameters: mdscount=1 mdtcount=1 testlist=conf-sanity envdefinitions=ONLY=82a
Signed-off-by: James Nunez <jnunez@whamcloud.com>
Change-Id: Ifc75d52d38d9cb401118ef7baa4014bddf6298f2
Reviewed-on: https://review.whamcloud.com/33689
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
done
ost_indices=$(comma_list $ost_indices)
done
ost_indices=$(comma_list $ost_indices)
- trap "restore_ostindex" EXIT
+ stack_trap "restore_ostindex" EXIT
echo -e "\nFormat $OSTCOUNT OSTs with sparse indices $ost_indices"
OST_INDEX_LIST=[$ost_indices] formatall
echo -e "\nFormat $OSTCOUNT OSTs with sparse indices $ost_indices"
OST_INDEX_LIST=[$ost_indices] formatall
error "start ost$i failed"
done
error "start ost$i failed"
done
+ # Collect debug information - start of test
+ do_nodes $(comma_list $(mdts_nodes)) \
+ $LCTL get_param osc.*.prealloc_*_id
+
mount_client $MOUNT || error "mount client $MOUNT failed"
wait_osts_up
$LFS df $MOUNT || error "$LFS df $MOUNT failed"
mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
mount_client $MOUNT || error "mount client $MOUNT failed"
wait_osts_up
$LFS df $MOUNT || error "$LFS df $MOUNT failed"
mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
+ stack_trap "do_nodes $(comma_list $(mdts_nodes)) \
+ $LCTL get_param osc.*.prealloc_*_id" EXIT
+
# 1. If the file does not exist, new file will be created
# with specified OSTs.
local file=$DIR/$tdir/$tfile-1
# 1. If the file does not exist, new file will be created
# with specified OSTs.
local file=$DIR/$tdir/$tfile-1
[[ -z "$file" || -z "$expected" ]] &&
error "check_stripe_count: invalid argument"
[[ -z "$file" || -z "$expected" ]] &&
error "check_stripe_count: invalid argument"
- local cmd="$GETSTRIPE -c $file"
+ local cmd="$LFS getstripe -c $file"
actual=$($cmd) || error "$cmd failed"
actual=${actual%% *}
if [[ $actual -ne $expected ]]; then
actual=$($cmd) || error "$cmd failed"
actual=${actual%% *}
if [[ $actual -ne $expected ]]; then
- [[ $expected -eq -1 ]] ||
- error "$cmd wrong: found $actual, expected $expected"
- [[ $actual -eq $OSTCOUNT ]] ||
- error "$cmd wrong: found $actual, expected $OSTCOUNT"
+ [[ $expected -eq -1 ]] || { $LFS getstripe $file;
+ error "$cmd not expected ($expected): found $actual"; }
+ [[ $actual -eq $OSTCOUNT ]] || { $LFS getstripe $file;
+ error "$cmd not OST count ($OSTCOUNT): found $actual"; }