Whamcloud - gitweb
LU-16868 tests: add check for replace_nid 24/51524/5
authorAlex Deiter <adeiter@tintri.com>
Fri, 30 Jun 2023 18:02:49 +0000 (22:02 +0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 14 Jul 2023 03:10:19 +0000 (03:10 +0000)
Added check for replace_nid operations and return an
error to prevent module reload errors and timeout
when unmounting targets.

Test-Parameters: trivial
Test-Parameters: testlist=conf-sanity env=ONLY=32a serverdistro=el7.9
Test-Parameters: testlist=conf-sanity env=ONLY=32a serverdistro=el8.7
Signed-off-by: Alex Deiter <adeiter@tintri.com>
Change-Id: I29a5de826ac8f0040dd671e502d30bac4a082c43
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51524
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/conf-sanity.sh

index 829f1f1..62b2cc2 100644 (file)
@@ -2044,13 +2044,25 @@ t32_test() {
                        mopts="loop,$mopts"
                fi
                $r $MOUNT_CMD -o $mopts $mdt_dev $tmp/mnt/mdt
-               $r $LCTL replace_nids $fsname-OST0000 $ostnid
+               $r $LCTL replace_nids $fsname-OST0000 $ostnid || {
+                       error_noexit "replace_nids $fsname-OST0000 $ostnid failed"
+                       return 1
+               }
                if $ost2_is_available; then
-                       $r $LCTL replace_nids $fsname-OST0001 $ostnid
+                       $r $LCTL replace_nids $fsname-OST0001 $ostnid || {
+                               error_noexit "replace_nids $fsname-OST0001 $ostnid failed"
+                               return 1
+                       }
                fi
-               $r $LCTL replace_nids $fsname-MDT0000 $nid
+               $r $LCTL replace_nids $fsname-MDT0000 $nid || {
+                       error_noexit "replace_nids $fsname-MDT0000 $nid failed"
+                       return 1
+               }
                if $mdt2_is_available; then
-                       $r $LCTL replace_nids $fsname-MDT0001 $nid
+                       $r $LCTL replace_nids $fsname-MDT0001 $nid || {
+                               error_noexit "replace_nids $fsname-MDT0001 $nid failed"
+                               return 1
+                       }
                fi
                $r $UMOUNT $tmp/mnt/mdt