When checking if a client/OST import is up, we have to
check for IDLE as well as FULL.
wait_osc_import_ready is provided for this, but a few spots
don't use it, so they occasionally fail.
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I826659a7f5953dee4e4551c1177479ef742b5589
Reviewed-on: https://review.whamcloud.com/34225
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
mount_client $MOUNT || error "mount client fails"
wait_osc_import_state mds ost FULL
mount_client $MOUNT || error "mount client fails"
wait_osc_import_state mds ost FULL
- wait_osc_import_state client ost FULL
+ wait_osc_import_ready client ost
check_mount || error "check_mount failed"
cleanup || error "cleanup failed with $?"
check_mount || error "check_mount failed"
cleanup || error "cleanup failed with $?"
[[ "$rs" == "ost1" ]] ||
error "file content error: expected: \"ost1\", actual: \"$rs\""
[[ "$rs" == "ost1" ]] ||
error "file content error: expected: \"ost1\", actual: \"$rs\""
- wait_osc_import_state client ost2 FULL
+ wait_osc_import_ready client ost2
}
run_test 33 "read can choose available mirror to read"
}
run_test 33 "read can choose available mirror to read"
lfs df || error "lfs df with deactivated OSC failed"
lctl --device %$OSC activate
# wait the osc back to normal
lfs df || error "lfs df with deactivated OSC failed"
lctl --device %$OSC activate
# wait the osc back to normal
- wait_osc_import_state client ost FULL
+ wait_osc_import_ready client ost
lfs df || error "lfs df with reactivated OSC failed"
rm -f $DIR/$tfile
lfs df || error "lfs df with reactivated OSC failed"
rm -f $DIR/$tfile