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>
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
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'"
}