Whamcloud - gitweb
LU-4887 tests: sanity-scrub interoperability tests with master 41/10641/2
authorFan Yong <fan.yong@intel.com>
Tue, 6 May 2014 02:37:10 +0000 (10:37 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 11 Jun 2014 19:38:10 +0000 (19:38 +0000)
In the master branch, the default behaviour for lfsck_start without
"-t" specified will trigger all supported LFSCK components. And the
master branch uses new "-t scrub" for control OI scrub. The changes
will cause the old (2.5.58 or older) sanity-scrub test scripts fail
at test_9/test_11.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I134f8ec7d3f9e5c60abb76d728727871a960a095
Reviewed-on: http://review.whamcloud.com/10641
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
lustre/tests/sanity-scrub.sh

index 04d916b..eae09fb 100644 (file)
@@ -52,6 +52,9 @@ check_and_setup_lustre
 [[ $(lustre_version_code ost1) -lt $(version_code 2.4.50) ]] &&
        ALWAYS_EXCEPT="$ALWAYS_EXCEPT 11 12 13 14"
 
+[[ $(lustre_version_code $SINGLEMDS) -ge $(version_code 2.5.59) ]] &&
+       SCRUB_ONLY="-t scrub"
+
 build_test_filter
 
 MDT_DEV="${FSNAME}-MDT0000"
@@ -63,7 +66,8 @@ scrub_start() {
        local n
 
        for n in $(seq $MDSCOUNT); do
-               do_facet mds$n $LCTL lfsck_start -M $(facet_svc mds$n) "$@" ||
+               do_facet mds$n $LCTL lfsck_start -M $(facet_svc mds$n) \
+                       $SCRUB_ONLY "$@" ||
                        error "($error_id) Failed to start OI scrub on mds$n"
        done
 }
@@ -85,8 +89,8 @@ scrub_status() {
                osd-ldiskfs.$(facet_svc mds$n).oi_scrub
 }
 
-START_SCRUB="do_facet $SINGLEMDS $LCTL lfsck_start -M ${MDT_DEV}"
-START_SCRUB_ON_OST="do_facet ost1 $LCTL lfsck_start -M ${OST_DEV}"
+START_SCRUB="do_facet $SINGLEMDS $LCTL lfsck_start -M ${MDT_DEV} $SCRUB_ONLY"
+START_SCRUB_ON_OST="do_facet ost1 $LCTL lfsck_start -M ${OST_DEV} $SCRUB_ONLY"
 STOP_SCRUB="do_facet $SINGLEMDS $LCTL lfsck_stop -M ${MDT_DEV}"
 SHOW_SCRUB="do_facet $SINGLEMDS \
                $LCTL get_param -n osd-ldiskfs.${MDT_DEV}.oi_scrub"