From: grev Date: Wed, 2 Sep 2009 16:36:54 +0000 (+0000) Subject: b=20186 X-Git-Tag: v1_8_2_01~1^2~144 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=c4f7baf2652491e33cab376564ab6e78734ed2c3;p=fs%2Flustre-release.git b=20186 i=Adilger conf-sanity test_32* 1.6->1.8 upgrade tests --- diff --git a/lustre/tests/Makefile.am b/lustre/tests/Makefile.am index d1aac52..0f93ea0 100644 --- a/lustre/tests/Makefile.am +++ b/lustre/tests/Makefile.am @@ -6,7 +6,7 @@ AM_CFLAGS = $(LLCFLAGS) DIST_SUBDIRS := mpi -noinst_DATA = disk1_4.zip +noinst_DATA = disk1_6.tar.bz2 noinst_SCRIPTS = leak_finder.pl llmount.sh llmountcleanup.sh functions.sh noinst_SCRIPTS += test-framework.sh runvmstat runiozone runtests noinst_SCRIPTS += sanity.sh rundbench acceptance-small.sh compile.sh diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index 53b4a58..750a206 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -970,11 +970,14 @@ test_32a() { [ "$NETTYPE" = "tcp" ] || { skip "NETTYPE != tcp" && return 0; } [ -z "$TUNEFS" ] && skip "No tunefs" && return 0 - local DISK1_4=$LUSTRE/tests/disk1_4.zip - [ ! -r $DISK1_4 ] && skip "Cant find $DISK1_4, skipping" && return + local DISK1_6=$LUSTRE/tests/disk1_6.tar.bz2 + [ ! -r $DISK1_6 ] && skip "Cant find $DISK1_6, skipping" && return local tmpdir=$TMP/conf32a - unzip -o -j -d $tmpdir $DISK1_4 || { skip "Cant unzip $DISK1_4, skipping" && return ; } + mkdir -p $tmpdir + + tar xjvf $DISK1_6 -C $tmpdir || + { skip "Cant untar $DISK1_6, skipping" && return ; } load_modules lctl set_param debug=$PTLDEBUG @@ -986,19 +989,19 @@ test_32a() { local UUID=$(lctl get_param -n mds.lustre-MDT0000.uuid) echo MDS uuid $UUID - [ "$UUID" == "mdsA_UUID" ] || error "UUID is wrong: $UUID" + [ "$UUID" == "lustre-MDT0000_UUID" ] || error "UUID is wrong: $UUID" $TUNEFS --mgsnode=`hostname` $tmpdir/ost1 || error "tunefs failed" start32 ost1 $tmpdir/ost1 "-o loop" || return 5 UUID=$(lctl get_param -n obdfilter.lustre-OST0000.uuid) echo OST uuid $UUID - [ "$UUID" == "ost1_UUID" ] || error "UUID is wrong: $UUID" + [ "$UUID" == "lustre-OST0000_UUID" ] || error "UUID is wrong: $UUID" local NID=$($LCTL list_nids | head -1) - echo "OSC changes should return err:" - $LCTL conf_param lustre-OST0000.osc.max_dirty_mb=15 && return 7 - $LCTL conf_param lustre-OST0000.failover.node=$NID && return 8 + echo "OSC changes should succeed:" + $LCTL conf_param lustre-OST0000.osc.max_dirty_mb=15 || return 7 + $LCTL conf_param lustre-OST0000.failover.node=$NID || return 8 echo "ok." echo "MDC changes should succeed:" $LCTL conf_param lustre-MDT0000.mdc.max_rpcs_in_flight=9 || return 9 @@ -1017,7 +1020,7 @@ test_32a() { rm -rf $tmpdir || true # true is only for TMP on NFS } -run_test 32a "Upgrade from 1.4 (not live)" +run_test 32a "Upgrade from 1.6 (not live)" test_32b() { # this test is totally useless on a client-only system @@ -1025,59 +1028,70 @@ test_32b() { [ "$NETTYPE" = "tcp" ] || { skip "NETTYPE != tcp" && return 0; } [ -z "$TUNEFS" ] && skip "No tunefs" && return - local DISK1_4=$LUSTRE/tests/disk1_4.zip - [ ! -r $DISK1_4 ] && skip "Cant find $DISK1_4, skipping" && return + local DISK1_6=$LUSTRE/tests/disk1_6.tar.bz2 + [ ! -r $DISK1_6 ] && skip "Cant find $DISK1_6, skipping" && return local tmpdir=$TMP/conf32b - unzip -o -j -d $tmpdir $DISK1_4 || { skip "Cant unzip $DISK1_4, skipping" && return ; } + mkdir -p $tmpdir + + tar xjvf $DISK1_6 -C $tmpdir || + { skip "Cant untar $DISK1_6, skipping" && return ; } + load_modules lctl set_param debug=$PTLDEBUG - local NEWNAME=sofia + # Ugrade process in according to comment 2 bug 20246 # writeconf will cause servers to register with their current nids - $TUNEFS --writeconf --fsname=$NEWNAME $tmpdir/mds || error "tunefs failed" - start32 mds $tmpdir/mds "-o loop" && \ + $TUNEFS --mdt --writeconf --erase-param \ + --param="mdt.group_upcall=/usr/sbin/l_getgroups" $tmpdir/mds || \ + error "tunefs mds failed" + + start32 mds $tmpdir/mds "-o loop,abort_recov" && \ trap cleanup_32 EXIT INT || return 3 - local UUID=$(lctl get_param -n mds.${NEWNAME}-MDT0000.uuid) + stop32 mds + start32 mds "-o loop" $tmpdir/mds || return 4 + local UUID=$(lctl get_param -n mds.lustre-MDT0000.uuid) echo MDS uuid $UUID - [ "$UUID" == "mdsA_UUID" ] || error "UUID is wrong: $UUID" + [ "$UUID" == "lustre-MDT0000_UUID" ] || error "UUID is wrong: $UUID" - $TUNEFS --mgsnode=`hostname` --fsname=$NEWNAME --writeconf $tmpdir/ost1 || error "tunefs failed" - start32 ost1 $tmpdir/ost1 "-o loop" || return 5 - UUID=$(lctl get_param -n obdfilter.${NEWNAME}-OST0000.uuid) + $TUNEFS --ost --writeconf --erase-param --mgsnode=`hostname`@$NETTYPE $tmpdir/ost1 || \ + error "tunefs ost failed" + start32 ost1 $tmpdir/ost1 "-o loop,abort_recov" || return 5 + + UUID=$(lctl get_param -n obdfilter.lustre-OST0000.uuid) echo OST uuid $UUID - [ "$UUID" == "ost1_UUID" ] || error "UUID is wrong: $UUID" + [ "$UUID" == "lustre-OST0000_UUID" ] || error "UUID is wrong: $UUID" echo "OSC changes should succeed:" - $LCTL conf_param ${NEWNAME}-OST0000.osc.max_dirty_mb=15 || return 7 - $LCTL conf_param ${NEWNAME}-OST0000.failover.node=$NID || return 8 + $LCTL conf_param lustre-OST0000.osc.max_dirty_mb=15 || return 7 + $LCTL conf_param lustre-OST0000.failover.node=$NID || return 8 echo "ok." echo "MDC changes should succeed:" - $LCTL conf_param ${NEWNAME}-MDT0000.mdc.max_rpcs_in_flight=9 || return 9 + $LCTL conf_param lustre-MDT0000.mdc.max_rpcs_in_flight=9 || return 9 echo "ok." # MDT and OST should have registered with new nids, so we should have # a fully-functioning client echo "Check client and old fs contents" - local device=`h2$NETTYPE $HOSTNAME`:/$NEWNAME + local device=`h2$NETTYPE $HOSTNAME`:/lustre echo "Starting local client: $HOSTNAME: $device $MOUNT" mount -t lustre $device $MOUNT || return 1 local old=$(lctl get_param -n mdc.*.max_rpcs_in_flight) local new=$((old + 5)) - lctl conf_param ${NEWNAME}-MDT0000.mdc.max_rpcs_in_flight=$new + lctl conf_param lustre-MDT0000.mdc.max_rpcs_in_flight=$new wait_update $HOSTNAME "lctl get_param -n mdc.*.max_rpcs_in_flight" $new || return 11 - [ "$(cksum $MOUNT/passwd | cut -d' ' -f 1,2)" == "2479747619 779" ] || return 12 + [ "$(cksum $MOUNT/passwd | cut -d' ' -f 1,2)" == "2940530074 2837" ] || return 12 echo "ok." cleanup_32 rm -rf $tmpdir || true # true is only for TMP on NFS } -run_test 32b "Upgrade from 1.4 with writeconf" +run_test 32b "Upgrade from 1.6 with writeconf" test_33a() { # bug 12333, was test_33 local rc=0 diff --git a/lustre/tests/disk1_4.zip b/lustre/tests/disk1_4.zip deleted file mode 100644 index 0970c83..0000000 Binary files a/lustre/tests/disk1_4.zip and /dev/null differ diff --git a/lustre/tests/disk1_6.tar.bz2 b/lustre/tests/disk1_6.tar.bz2 new file mode 100644 index 0000000..84beec2 Binary files /dev/null and b/lustre/tests/disk1_6.tar.bz2 differ