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>
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