Whamcloud - gitweb
LU-16868 tests: add check for replace_nid
authorAlex Deiter <adeiter@tintri.com>
Fri, 30 Jun 2023 18:02:49 +0000 (22:02 +0400)
committerAndreas Dilger <adilger@whamcloud.com>
Sun, 16 Jul 2023 23:09:14 +0000 (23:09 +0000)
Added check for replace_nid operations and return an
error to prevent module reload errors and timeout
when unmounting targets.

Lustre-change: https://review.whamcloud.com/51524
Lustre-commit: TBD (from a822c82326821c5c30e14d9620cd2976d5438714)

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/ex/lustre-release/+/51604
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/tests/conf-sanity.sh

index e237a5d..f6a7eb5 100644 (file)
@@ -1844,10 +1844,19 @@ 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-MDT0000 $nid
+               $r $LCTL replace_nids $fsname-OST0000 $ostnid || {
+                       error_noexit "replace_nids $fsname-OST0000 $ostnid failed"
+                       return 1
+               }
+               $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