Whamcloud - gitweb
LU-12846 tests: verify orphan upgrade compatibilty 36/37636/7
authorArtem Blagodarenko <artem.blagodarenko@hpe.com>
Wed, 19 Feb 2020 16:38:31 +0000 (11:38 -0500)
committerOleg Drokin <green@whamcloud.com>
Tue, 7 Apr 2020 17:18:48 +0000 (17:18 +0000)
There was a discussion in LU-13070 that name compatibility
is useless, because orphan's name is not taken into account
in orphans deletion loop.

This test shows that orphan with a name format before 2.11
can not be deleted in mdd_orphan_destroy() that can lead
to an endless loop:

    mdd_orphan_destroy() t32fs-MDD0000: could not delete
        orphan [0x200000bd0:0x1:0x0]: rc = -2

Print a banner in each test_32 subtest to separate images.

Test-Parameters: trivial testlist=conf-sanity envdefinitions=ONLY=32,ONLY_REPEAT=4
Signed-off-by: Artem Blagodarenko <artem.blagodarenko@hpe.com>
Change-Id: I351ff3e5f3d10dabfd76cb1c9f07d3fc597004a6
Reviewed-on: https://review.whamcloud.com/37636
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
lustre/tests/conf-sanity.sh
lustre/tests/disk2_7-ldiskfs.tar.bz2

index fcdd734..5c86ba9 100644 (file)
@@ -113,6 +113,16 @@ start_mdt() {
        start $facet ${dev} $MDS_MOUNT_OPTS $@ || return 94
 }
 
+stop_mdt_no_force() {
+       local num=$1
+       local facet=mds$num
+       local dev=$(mdsdevname $num)
+       shift 1
+
+       echo "stop mds service on `facet_active_host $facet`"
+       stop $facet || return 97
+}
+
 stop_mdt() {
        local num=$1
        local facet=mds$num
@@ -1427,6 +1437,16 @@ test_32newtarball() {
        echo $T32_BLIMIT > $tmp/img/blimit
        echo $T32_ILIMIT > $tmp/img/ilimit
 
+       $MULTIOP /mnt/$FSNAME/orph_file Ouw_c&
+       pid=$!
+       sync
+       stop_mdt_no_force 1
+       debugfs -R "ls /PENDING" ${MDSDEV1:-$MDSDEV}
+       cp ${MDSDEV1:-$MDSDEV} $tmp/img
+       start_mdt 1
+       kill -s USR1 $pid
+       wait $pid
+
        stopall
 
        pushd $tmp/src
@@ -1440,7 +1460,6 @@ test_32newtarball() {
        uname -r >$tmp/img/kernel
        uname -m >$tmp/img/arch
 
-       mv ${MDSDEV1:-$MDSDEV} $tmp/img
        for num in $(seq 2 $MDSCOUNT); do
                local devname=$(mdsdevname $num)
                local facet=mds$num
@@ -2318,6 +2337,19 @@ t32_test() {
                }
                shall_cleanup_lustre=false
        else
+               $MOUNT_CMD $nid:/$fsname $tmp/mnt/lustre || {
+                       error_noexit "Mounting the client"
+                       return 1
+               }
+
+               [[ $(do_facet mds1 pgrep orph_.*-MDD | wc -l) == 0 ]] ||
+                       error "MDD orphan cleanup thread not quit"
+
+               umount $tmp/mnt/lustre || {
+                       error_noexit "Unmounting the client"
+                       return 1
+               }
+
                if [[ "$dne_upgrade" != "no" ]] || $mdt2_is_available; then
                        $r $UMOUNT $tmp/mnt/mdt1 || {
                                error_noexit "Unmounting the MDT2"
@@ -2389,6 +2421,7 @@ test_32a() {
 
        t32_check
        for tarball in $tarballs; do
+               banner "testing $tarball upgrade"
                t32_test $tarball || let "rc += $?"
        done
        return $rc
@@ -2402,6 +2435,7 @@ test_32b() {
 
        t32_check
        for tarball in $tarballs; do
+               banner "testing $tarball upgrade with writeconf"
                t32_test $tarball writeconf || let "rc += $?"
        done
        return $rc
@@ -2417,8 +2451,9 @@ test_32c() {
        t32_check
        for tarball in $tarballs; do
                # Do not support 1_8 and 2_1 direct upgrade to DNE2 anymore */
-               echo $tarball | grep "1_8" && continue
-               echo $tarball | grep "2_1" && continue
+               [[ "$tarball" =~ "1_8" ]] && echo "skip $tarball" && continue
+               [[ "$tarball" =~ "2_1" ]] && echo "skip $tarball" && continue
+               banner "testing $tarball upgrade with DNE"
                load_modules
                dne_upgrade=yes t32_test $tarball writeconf || rc=$?
        done
@@ -2433,6 +2468,7 @@ test_32d() {
 
        t32_check
        for tarball in $tarballs; do
+               banner "testing $tarball upgrade with ff convert"
                ff_convert=yes t32_test $tarball || rc=$?
        done
        return $rc
@@ -2449,8 +2485,9 @@ test_32e() {
 
        t32_check
        for tarball in $tarballs; do
-               echo $tarball | grep "2_9" || continue
+               [[ "$tarball" =~ "2_9" ]] || continue
                #load_modules
+               banner "testing $tarball upgrade with DoM"
                dom_upgrade=yes t32_test $tarball writeconf || let "rc += $?"
        done
        return $rc
index b5a6974..e63bf80 100644 (file)
Binary files a/lustre/tests/disk2_7-ldiskfs.tar.bz2 and b/lustre/tests/disk2_7-ldiskfs.tar.bz2 differ