Whamcloud - gitweb
LU-18882 tests: sanity/56ca to reset readonly and wait 35/58635/3
authorAlex Zhuravlev <bzzz@whamcloud.com>
Wed, 2 Apr 2025 03:36:34 +0000 (06:36 +0300)
committerOleg Drokin <green@whamcloud.com>
Wed, 16 Apr 2025 20:45:03 +0000 (20:45 +0000)
sanity/56ca should wait till readonly=0 is propagated,
otherwise few subsequent tests may find OST0000 read-only
and fail.

Fixes: 51c4e89318 ("LU-18833 ofd: Set OS_STATE_* flags correctly for read-only devices")
Test-Parameters: trivial
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I7767c0ec932395e127ffb53fd91f9af182a34b40
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58635
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/tests/sanity.sh

index fa71e02..33cf09f 100755 (executable)
@@ -6965,9 +6965,6 @@ test_56ca() {
        local o_idx=0 # Target OST which will be set to readonly
        local ost_name=$(ostname_from_index $o_idx)
 
-       stack_trap "do_facet ost${o_idx} $LCTL set_param -n \
-               obdfilter.$ost_name.readonly=0"
-
        # Force set OST0 as readonly
        do_facet ost${o_idx} $LCTL set_param -n obdfilter.$ost_name.readonly=1
 
@@ -6975,6 +6972,10 @@ test_56ca() {
 
        local new_status=$(ost_dev_status $o_idx $MOUNT -v) # Get new stats
 
+       # revert to the normal state and wait for propagation
+       do_facet ost${o_idx} $LCTL set_param -n obdfilter.$ost_name.readonly=0
+       sleep_maxage
+
        [[ "$new_status" =~ "R" ]] ||
                error "$ost_name status is '$new_status', missing 'R'"
 }