From: Alex Zhuravlev Date: Wed, 2 Apr 2025 03:36:34 +0000 (+0300) Subject: LU-18882 tests: sanity/56ca to reset readonly and wait X-Git-Tag: 2.16.55~115 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F35%2F58635%2F3;p=fs%2Flustre-release.git LU-18882 tests: sanity/56ca to reset readonly and wait 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 Change-Id: I7767c0ec932395e127ffb53fd91f9af182a34b40 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58635 Reviewed-by: Arshad Hussain Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Tested-by: jenkins Tested-by: Maloo --- diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index fa71e02..33cf09fc 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -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'" }