From d6759859a7428e5a8e19afdfb7f1f764be06452c Mon Sep 17 00:00:00 2001 From: Alex Zhuravlev Date: Wed, 2 Apr 2025 06:36:34 +0300 Subject: [PATCH] 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 --- lustre/tests/sanity.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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'" } -- 1.8.3.1