This patch ensures that all OSTs are active to be selected
for objids allocations. This will allow for random selection
of OSTs during setstripe to be effective.
To do so, wait_osts_up() has been exported from conf-sanity
to test-framework to become part of the generic functions
set and be used from any tests suites, and particularly in
replay-single/test_90 sub-test.
Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: Id5db31948ab86c1b3c2bc289191917ed3e8aadf8
Reviewed-on: https://review.whamcloud.com/23148
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
}
run_test 81 "sparse OST indexing"
}
run_test 81 "sparse OST indexing"
-# Wait OSTs to be active on both client and MDT side.
-wait_osts_up() {
- local cmd="$LCTL get_param -n lov.$FSNAME-clilov-*.target_obd |
- awk 'BEGIN {c = 0} /ACTIVE/{c += 1} END {printf \\\"%d\\\", c}'"
- wait_update $HOSTNAME "eval $cmd" $OSTCOUNT ||
- error "wait_update OSTs up on client failed"
-
- cmd="$LCTL get_param -n lod.$FSNAME-MDT*-*.target_obd | sort -u |
- awk 'BEGIN {c = 0} /ACTIVE/{c += 1} END {printf \\\"%d\\\", c}'"
- wait_update_facet $SINGLEMDS "eval $cmd" $OSTCOUNT ||
- error "wait_update OSTs up on MDT failed"
-}
-
# Here we exercise the stripe placement functionality on a file system that
# has formatted the OST with a random index. With the file system the following
# functionality is tested:
# Here we exercise the stripe placement functionality on a file system that
# has formatted the OST with a random index. With the file system the following
# functionality is tested:
- # maybe effected by previous test
- wait_osc_import_state mds ost FULL
+ # ensure all OSTs are active to allow allocations
+ wait_osts_up
mkdir $dir || error "mkdir $dir failed"
mkdir $dir || error "mkdir $dir failed"
+# Wait OSTs to be active on both client and MDT side.
+wait_osts_up() {
+ local cmd="$LCTL get_param -n lov.$FSNAME-clilov-*.target_obd |
+ awk 'BEGIN {c = 0} /ACTIVE/{c += 1} END {printf \\\"%d\\\", c}'"
+ wait_update $HOSTNAME "eval $cmd" $OSTCOUNT ||
+ error "wait_update OSTs up on client failed"
+
+ cmd="$LCTL get_param -n lod.$FSNAME-MDT*-*.target_obd | sort -u |
+ awk 'BEGIN {c = 0} /ACTIVE/{c += 1} END {printf \\\"%d\\\", c}'"
+ wait_update_facet $SINGLEMDS "eval $cmd" $OSTCOUNT ||
+ error "wait_update OSTs up on MDT failed"
+}
+
wait_destroy_complete () {
echo "Waiting for local destroys to complete"
# MAX value shouldn't be big as this mean server responsiveness
wait_destroy_complete () {
echo "Waiting for local destroys to complete"
# MAX value shouldn't be big as this mean server responsiveness