Whamcloud - gitweb
LU-12022 tests: error on resync failure sanity-flr 54/35754/7
authorJames Nunez <jnunez@whamcloud.com>
Tue, 15 Jun 2021 17:14:49 +0000 (11:14 -0600)
committerOleg Drokin <green@whamcloud.com>
Thu, 22 Jul 2021 01:49:44 +0000 (01:49 +0000)
In sanity-flr test 200, we should error if the final resync
fails.  Replace all calls to 'mirror_io resync' that does
not inject an error to  '$LFS mirror resync'.

Test-Parameters: trivial testlist=sanity-flr
Signed-off-by: James Nunez <jnunez@whamcloud.com>
Change-Id: I9b2ec1beb7060086808b7529467bef80c8e9659f
Reviewed-on: https://review.whamcloud.com/35754
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
lustre/tests/sanity-flr.sh

index 32f666e..b9a91c0 100644 (file)
@@ -1606,7 +1606,7 @@ test_38() {
        [ -z "$stale_mirror" ] && error "stale mirror doesn't exist"
        [ -z "$valid_mirror" ] && error "valid mirror doesn't exist"
 
        [ -z "$stale_mirror" ] && error "stale mirror doesn't exist"
        [ -z "$valid_mirror" ] && error "valid mirror doesn't exist"
 
-       mirror_io resync $tf || error "resync failed"
+       $LFS mirror resync $tf || error "resync failed"
        verify_flr_state $tf "ro"
 
        mirror_cksum=$($LFS mirror read -N $stale_mirror $tf | md5sum)
        verify_flr_state $tf "ro"
 
        mirror_cksum=$($LFS mirror read -N $stale_mirror $tf | md5sum)
@@ -1629,7 +1629,7 @@ test_38() {
        verify_flr_state $tf "sp"
 
        # from sync_pending to read_only
        verify_flr_state $tf "sp"
 
        # from sync_pending to read_only
-       mirror_io resync $tf || error "resync failed"
+       $LFS mirror resync $tf || error "resync failed"
        verify_flr_state $tf "ro"
 }
 run_test 38 "resync"
        verify_flr_state $tf "ro"
 }
 run_test 38 "resync"
@@ -2868,7 +2868,7 @@ test_200() {
        rm -f $lock_file
 
        # resync and verify mirrors
        rm -f $lock_file
 
        # resync and verify mirrors
-       mirror_io resync $tf
+       $LFS mirror resync $tf || error "final resync failed"
        get_mirror_ids $tf
 
        local csum=$($LFS mirror read -N ${mirror_array[0]} $tf | md5sum)
        get_mirror_ids $tf
 
        local csum=$($LFS mirror read -N ${mirror_array[0]} $tf | md5sum)
@@ -2921,7 +2921,7 @@ test_201() {
 
                [ $now -lt $((ts + delay)) ] && sleep $((ts + delay - now))
 
 
                [ $now -lt $((ts + delay)) ] && sleep $((ts + delay - now))
 
-               mirror_io resync $file
+               $LFS mirror resync $file
                echo "$file resync done"
        done
 
                echo "$file resync done"
        done