Whamcloud - gitweb
LU-3002 tests: Fix an OST index issue in replay-single
authorLi Wei <wei.g.li@intel.com>
Thu, 21 Mar 2013 07:55:16 +0000 (15:55 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 27 Mar 2013 22:02:56 +0000 (18:02 -0400)
When run with 16 OSTs, replay-single 90 happened to pick ost14 as
ostfail and complained:

  lfs find does not report the affected lustre-OST000d_UUID for fd

The "d" in "fd" is a hexadecimal OST index, taken from
"lustre-OST000d_UUID".  Because the actual file names use decimal OST
indices, the test failed to match the file "f13" with "fd".  Moreover,
the test assumes the OST index is a single-digit number, which may not
be case with more than 15 OSTs.  This patch changes the test to simply
calculate the index from the facet name.

Test-Parameters: ostcount=32 testlist=replay-single envdefinitions=ONLY=90
Change-Id: I0c95d28f83c41cabf4ed8e5ed618897d6000da3b
Signed-off-by: Li Wei <wei.g.li@intel.com>
Reviewed-on: http://review.whamcloud.com/5796
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/replay-single.sh

index 1f9a43f..7e02176 100755 (executable)
@@ -2747,7 +2747,7 @@ test_90() { # bug 19494
     # Before failing an OST, get its obd name and index
     local varsvc=${ostfail}_svc
     local obd=$(do_facet $ostfail lctl get_param -n obdfilter.${!varsvc}.uuid)
-    local index=${obd:(-6):1}
+       local index=$(($(facet_number $ostfail) - 1))
 
     echo "Fail $ostfail $obd, display the list of affected files"
     shutdown_facet $ostfail || return 2